Describe the bug
When we paste nodes the whole graph is cleared and re-created, which can bring performance issues
To Reproduce
- Copy a node (Ctrl+C)
- Add a breakpoint on this line :
|
graph._deserialize(self.data) |
- Paste it (Ctrl+V)
- Explore the call stack :
|
result = self.push(commands.PasteNodesCommand(self._graph, graphData, pos)) |
|
graph._deserialize(self.data) |
|
self._clearGraphContent() |
-> the graph is cleared before being re-created
Describe the bug
When we paste nodes the whole graph is cleared and re-created, which can bring performance issues
To Reproduce
Meshroom/meshroom/ui/commands.py
Line 230 in 0ab90c0
Meshroom/meshroom/ui/graph.py
Line 1616 in 0ab90c0
Meshroom/meshroom/ui/commands.py
Line 230 in 0ab90c0
Meshroom/meshroom/core/graph.py
Line 307 in 0ab90c0