feat(speckle_ifc): More granular IFC conversion progress#492
Merged
feat(speckle_ifc): More granular IFC conversion progress#492
Conversation
✅ Deploy Preview for specklepy ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
Author
|
TODO: I need to test this properly locally |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #492 +/- ##
==========================================
+ Coverage 91.54% 91.82% +0.28%
==========================================
Files 146 149 +3
Lines 6895 7011 +116
==========================================
+ Hits 6312 6438 +126
+ Misses 583 573 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the IFC acc importer, we are occasionally observing ingestions timeout due to ingestion inactivity.
These are mostly super large models with very complex geometry.
While there is a generous 20 min timeout, the IFC Importer produces very few updates, unlike other importers who have far more granular progress.
We can increase the 20min timeout, but this will degrade the experience under other circumstances (such as OOM) where.
So alternativly, the better solution is to architect the IFC importer to send more frequent updates.
Inspired by the IngestionProgressManager we created for the .NET stack, I have created a similar solution here in python.
It behaves a bit differently form the .NET one, mostly because we're performing sync requests here in python.
But the tl;dr is, it allows us to throttle progress updates, which allows us to send updates about geometry/element conversion from IFC.
I'm throttling updates to one every 10 seconds, which is coarse compared to the 1.5 seconds we do for .NET importers, but 10 seconds is the same as .NET connectors. Since python is doing blocking sync updates, I didn't want to degrade performance by doing any more frequent than 10 seconds.
Topics to discuss:
FileImportclass is now dependent on thisIngestionProgressManager, which makes it dependent on ingestion API.I could have spent some time abstracting this away, but I figured, ingestions are the way forward for our API, and it's python, people can always hack around the typing if they're crazy enough.