mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-28 09:47:20 +02:00
[core] ListAttribute: add early return test for value setter
Skip value assignment when the value is a list identical to the ListAttribute's current value. This avoids internal models and graph update, which can have a significant impact on performance when the number of elements grows.
This commit is contained in:
parent
70546c753b
commit
2f6d802445
1 changed files with 2 additions and 0 deletions
|
@ -535,6 +535,8 @@ class ListAttribute(Attribute):
|
|||
self.valueChanged.emit()
|
||||
|
||||
def _set_value(self, value):
|
||||
if isinstance(value, list) and value == self.getExportValue():
|
||||
return
|
||||
if self.node.graph:
|
||||
self.remove(0, len(self))
|
||||
# Link to another attribute
|
||||
|
|
Loading…
Add table
Reference in a new issue