-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix: improve performance of all node styling functions in Cognite3DModel #1186
Conversation
📙 Documentation preview is available from |
await treeIndices.forEach(idx => this.selectedNodes.add(idx)); | ||
this.cadNode.requestNodeUpdate(treeIndices); | ||
return treeIndices.count; | ||
if (applyToChildren) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above comment
Codecov Report
@@ Coverage Diff @@
## master #1186 +/- ##
==========================================
- Coverage 64.25% 63.74% -0.52%
==========================================
Files 94 95 +1
Lines 4247 4330 +83
Branches 416 414 -2
==========================================
+ Hits 2729 2760 +31
- Misses 1515 1567 +52
Partials 3 3
|
There were failures in the examples workflow. This usually means a visual regression test has failed. Image diffs for visual tests can be downloaded as an artifact here. If there are no artifacts there's an error somewhere else in the examples workflow. If you have made intentional changes you can update the image snapshots by running |
This reverts commit 8af0454.
… Comment about horrible code.
This improves performance when the user repeatedly calls
Cognite3dModel.setNodeColorByTreeIndex
and other node style modification functions by batching calls torequestNodeUpdate
.A good test case is the following (which can be used in the documentation):
In my test the time is reduced from 4.5 s to about 1 s.