YHJ
November 8, 2022, 5:30am
1
Hello,
I’m using LineWidget (See example code) and the following warning appears.
[Violation] ‘pointerdown’ handler took 364ms
Perhaps the problem is over-calling due to Event Bubbling or Capturing.
The view I’m configuring is an environment where other widgets besides LineWidget can be invoked, and if warnings continue, I think I should limit the widgets.
Is there any way to avoid this?
Thanks, always
YHJ
November 8, 2022, 7:02am
3
In the attached image, each situation is
Frames when the first two were created first
Frames when five are created afterwards
Frames when all are deleted
There seems to be too much difference.
finetjul
(Julien Finet)
November 8, 2022, 7:11am
4
Can you try the “profile” function from the “Performance” tab of your “Developer Tools”?
I think this might be related to this:
opened 03:42PM - 02 Nov 22 UTC
type: bug 🐞
type: performance ⚡️
<!--
👋 Hello, and thank you for starting this contribution!
❓ If you are tryin… g to submit a question for general support, please reach out on our discourse forum instead: https://discourse.vtk.org/c/web/9
🐞 If you do need to report a bug, please follow the template below to increase the chances of your report being looked at.
🧱 If adequate, assign one of the `Module: XXX` labels to your issue when creating it.
-->
### High-level description
Clicking and rotating ImageCroppingWidgetExample is slower after https://github.com/Kitware/vtk-js/commit/b85167c177e3ddd292c1a8ed6e7967b3a2084c49
In one comparison, mouse orbit task update takes ~5ms on master. With commit right before https://github.com/Kitware/vtk-js/commit/b85167c177e3ddd292c1a8ed6e7967b3a2084c49 mouse orbit task takes ~1ms.
### Steps to reproduce
Run ImageCroppingWidgetExample on branch master, record performance via devtools, rotate camera with mouse. Compare task time with 93e74fcd9edb4d35f8301fa2620df89affcb6b43 <- good one right before trouble commit.
### Detailed behavior
<!--
A detailed description of what happens. If applicable, use:
* screenshots (drag and drop)
* live examples (ex: https://codepen.io/jourdain/pen/RQZWYa)
-->
WidgetManager.updateDisplayScaleParams called many times every frame.
### Environment
- **vtk.js**: 25.12.0
You might want to try with v25.8.5 to see if it is still slow.
YHJ
November 8, 2022, 7:24am
5
I downgraded the version and it didn’t slow down!
Also, when I checked the performance, there were a lot of “Internal deepEqual” calls.
Thank you for solving it!