aboutcode-org / aboutcode-org/scancode.io

package assembly in `inspect_packages` and other pipelines is too slow

オープン
#1,398 コメント 7 件 リアクション 0 件 担当者 1 名 @AyanSinhaMahapatra が担当を希望しています GitHub で見る
bug performance
主要言語
Python
スター
215
フォーク
203
平均マージ
4日 8時間
マージ済み PR(30日)
6

説明

I am running the `inspect_packages` pipeline on a very large codebase that is an npm package. The pipeline takes a very long time at the `scan_for_application_packages` step on the package assembly portion of package scanning (https://github.com/aboutcode-org/scancode.io/blob/main/scanpipe/pipes/scancode.py#L459), where we are running this code (https://github.com/aboutcode-org/scancode-toolkit/blob/develop/src/packagedcode/npm.py#L82)

Since this codebase is an npm package, we pretty much consider all files in it to be part of the npm package. We are running code that is originally intended for a scancode-toolkit codebase. Walking a codebase using sctk code on a scio codebase is not performant because each call to a sctk codebase traversal method is an individual query to the database. The methods here are called multiple times and `.save()` is called on each Resource when performing package assembly.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。