aboutcode-org / aboutcode-org/purldb

Performance issues when using `api/resources/filter_by_checksums`

オープン
#551 コメント 1 件 リアクション 0 件 担当者 1 名 @JonoYang が担当を希望しています GitHub で見る
主要言語
HTML
スター
67
フォーク
69
平均マージ
8日 8時間
マージ済み PR(30日)
1

説明

On certain large purldb instances, when using the `api/resources/filter_by_checksums` endpoint via the scancode.io `map_deploy_to_develop` pipeline, the `match_to_purldb_resource` step is very slow and can take +30 hours to complete.

After debugging, we found that the two biggest reasons for the slowness are:

- Ordering of Resources, a lot of CPU time is spent ordering resources from a query
- Decoding large JSON fields, a lot of time is spent parsing JSON fields if they are too big, like the history field on Package

Immediate solutions that come to mind:

- Remove ordering for Resources
- Create proper History model for Package, expedient thing would be to empty history json field. Look into using `.only()` on queries.

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

このリポジトリのコントリビューションガイドは索引されていません

評価

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

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

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