mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:59:00 +08: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
@ -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…
x
Reference in New Issue
Block a user