Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance of diagram viewport change #4206

Open
4 tasks done
AresEkb opened this issue Nov 16, 2024 · 1 comment
Open
4 tasks done

Improve performance of diagram viewport change #4206

AresEkb opened this issue Nov 16, 2024 · 1 comment

Comments

@AresEkb
Copy link
Contributor

AresEkb commented Nov 16, 2024

  • I have checked that this bug has not yet been reported by someone else
  • I have checked that this bug appears on Chrome
  • I have specified the version :
  • latest
  • I have specified my environment :
  • my computer: Linux

Screenshots

No

Steps to reproduce

Drag any diagram to change its viewport. You can try to do it fast, in different directions.

Expected behavior

The diagram viewport is changed without any lags.

Actual behavior

Diagram drag is very laggy.

AresEkb added a commit to AresEkb/sirius-web that referenced this issue Nov 16, 2024
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
@AresEkb
Copy link
Contributor Author

AresEkb commented Nov 16, 2024

Here is the fix #4207

The problem is that <DiagramPanel> calls useArrangeAll() that calls useViewport(). When you drag a diagram, a viewport is changed, so useViewport() hook is updated, so useArrangeAll() is updated and so <DiagramPanel> is re-rendered. It can be re-rendered hundreds times during drag

I added a new hook useViewportZoom() that updated when zoom is changed. It's not updated on diagram drag

AresEkb added a commit to AresEkb/sirius-web that referenced this issue Nov 16, 2024
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Nov 16, 2024
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Nov 19, 2024
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Nov 22, 2024
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Nov 27, 2024
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Dec 14, 2024
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Dec 21, 2024
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Dec 27, 2024
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Jan 6, 2025
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Jan 6, 2025
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Jan 7, 2025
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Jan 7, 2025
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Jan 15, 2025
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Feb 6, 2025
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Feb 23, 2025
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
AresEkb added a commit to AresEkb/sirius-web that referenced this issue Feb 28, 2025
Bug: eclipse-sirius#4206
Signed-off-by: Denis Nikiforov <denis.nikif@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant