mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:19:13 +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
|
return
|
||||||
|
|
||||||
# Check all settings for relations, so we can also calculate the correct values for dependent settings.
|
# Check all settings for relations, so we can also calculate the correct values for dependent settings.
|
||||||
changed_setting_keys = set(stack.getTop().getAllKeys())
|
top_of_stack = stack.getTop() #Cache for efficiency.
|
||||||
for key in stack.getTop().getAllKeys():
|
changed_setting_keys = set(top_of_stack.getAllKeys())
|
||||||
instance = stack.getTop().getInstance(key)
|
for key in top_of_stack.getAllKeys():
|
||||||
|
instance = top_of_stack.getInstance(key)
|
||||||
self._addRelations(changed_setting_keys, instance.definition.relations)
|
self._addRelations(changed_setting_keys, instance.definition.relations)
|
||||||
Job.yieldThread()
|
Job.yieldThread()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user