Skip to content

Conversation

@wawanbreton
Copy link
Contributor

This PR provides 2 changes:

  • Disable the garbage collector while loading cached containers from pickled files. This makes the loading twice as fast, which is significant because we do it multiple times with large containers
  • Set the proper container sub-type in the metadata so that we can properly filter on sub-types (necessary for CURA-12016 improve loading time with many printers Cura#20813)

CURA-12016

CURA-12016
This cuts the loading time of those files by half, knowing that for global stacks it can be up to 500ms, and done multiple times.
CURA-12016
Add a method to load instances of GlobalStack instead of loading all the ContainerStack and then filtering them. This makes the code more explicit and saves some time.
@github-actions
Copy link

Test Results

2 407 tests  ±0   2 392 ✅ ±0   22s ⏱️ -1s
    1 suites ±0      15 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit cf37631. ± Comparison against base commit 66fa8ac.

Copy link
Member

@rburema rburema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can (temporarily) disable the gc 'more generally' than just that piece of code -- there must be other tasks where that's in the way.

@wawanbreton
Copy link
Contributor Author

I wonder if we can (temporarily) disable the gc 'more generally' than just that piece of code -- there must be other tasks where that's in the way.

Probably indeed. It seems to really be beneficial when a piece of code instanciates or releases a lot of objects. Right I don't see an obvious part where this happens, but we can definitely keep it in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants