mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Cache top of stack for efficiency
Otherwise you need to retrieve this container for every key again. Doesn't matter much, but a bit. Contributes to issue CURA-4186.
This commit is contained in:
parent
4a788dfbdd
commit
3c36c3427c
1 changed files with 4 additions and 3 deletions
|
@ -310,9 +310,10 @@ class StartSliceJob(Job):
|
|||
return
|
||||
|
||||
# Check all settings for relations, so we can also calculate the correct values for dependent settings.
|
||||
changed_setting_keys = set(stack.getTop().getAllKeys())
|
||||
for key in stack.getTop().getAllKeys():
|
||||
instance = stack.getTop().getInstance(key)
|
||||
top_of_stack = stack.getTop() #Cache for efficiency.
|
||||
changed_setting_keys = set(top_of_stack.getAllKeys())
|
||||
for key in top_of_stack.getAllKeys():
|
||||
instance = top_of_stack.getInstance(key)
|
||||
self._addRelations(changed_setting_keys, instance.definition.relations)
|
||||
Job.yieldThread()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue