-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profile and optimize BOM ingestion performance #635
Comments
Transaction size is a big concern, but the approach may still be worth building a PoC for, which should be tested with very large BOMs. It could be that relying on database transactions becomes feasible again, if the ingestion process itself is less heavy. In the current state it might be problematic. Another way of emulating transactional behavior is to perform compensating controls in the application, instead of in the database. Simple example: Deleting all previously created components, if processing fails halfway through (only works for new projects). Once we have a PoC, it should be tested for a longer period of time (multiple days) in a test environment. |
Flame graph when importing Majority of the time is spent in At the moment, each component is inserted / updated in its own transaction. For the bloated BOM with 9056 components, this results in >= 9056 transactions. If running the entire thing in a single transaction is not feasible, we could at the very least look into "batching" multiple components in a transaction. The entire import takes about 20sec on my laptop. |
There are also some bugs in the current logic, mostly triggered when BOMs include duplicate components:
One of the suggestions made is that converting from CycloneDX to the DT model should be done entirely without database interactions. This would allow for an additional de-duplication step prior to reading / writing to / from the DB. |
We found that ingestion of large BOMs (>10k components) can take a long time, especially when multiple of those are uploaded concurrently.
We did not touch the ingestion code so far, but it is likely that there's still plenty of headroom for performance optimizations.
The text was updated successfully, but these errors were encountered: