Roniasoft / NodeLink

Qt/QML NodeLink. Dataflow programming library
http://www.roniasoft.se
Apache License 2.0
26 stars 6 forks source link

[BUG]: Performance dropping when moving multiple nodes #166

Open l3enQ opened 9 months ago

l3enQ commented 9 months ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Software Versions Application version: (add either official git release version or git SHA) Firmware version: (add either official git release version or git SHA)

Additional context Add any other context about the problem here.

HamedMasafi commented 9 months ago

I checked and saw that in the mouse movement event, the position relative to the last point is saved, which can cause lag. I changed this routine to coordinates relative to the click point.

https://github.com/Roniasoft/NodeLink/blob/wip/movement_speed/resources/View/ObjectSelectionView.qml#L106

https://github.com/Roniasoft/NodeLink/blob/wip/movement_speed/resources/View/ObjectSelectionView.qml#L130

Also, I added a flag in the bottom line so that PortView.qml::opacity properties do not change when the Nodes are moving.

https://github.com/Roniasoft/NodeLink/blob/wip/movement_speed/resources/View/PortView.qml#L39

My changes are available on the movement_speed branch. I would be grateful if someone could test them.

HamedMasafi commented 8 months ago

Memory managment checked; There's no memory leak. Nodes destroy correctly after deleting from scene but I found that some function in I_Scene.qml can be written in better way. I'll send a PR