catmaid / CATMAID

Collaborative Annotation Toolkit for Massive Amounts of Image Data
https://catmaid.org
GNU General Public License v3.0
188 stars 57 forks source link

Graph widget is fantastically slow #1711

Open aschampion opened 6 years ago

aschampion commented 6 years ago

Even with only 13 neurons, on neurocean. Will look into it tomorrow.

acardona commented 6 years ago

I've noticed the slowness of the graph widget is perhaps related to zooming in and out. Refreshing seems to address the issue. An update of the cytoscapejs library has been pending for a while IIRC.

On Mar 19, 2018, at 8:20 PM, Andrew Champion notifications@github.com wrote:

Even with only 13 neurons, on neurocean. Will look into it tomorrow.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

tomka commented 6 years ago

I don't seem to see any problems here. It's fast with about 40 neurons and even with 250 neurons I can zoom in and out quickly and move nodes around. Cytoscape.js has indeed not been updated in a while. We use v2.7.13 and v3.2.10 seems to be current.

aschampion commented 6 years ago

On OSX. Maybe a hidpi issue? Will check later.

On Mon, Mar 19, 2018, 8:40 PM Tom Kazimiers notifications@github.com wrote:

I don't seem to see any problems here. It's fast with about 40 neurons and even with 250 neurons I can zoom in and out quickly and move nodes around. Cytoscape.js has indeed not been updated in a while. We use v2.7.13 and v3.2.10 seems to be current.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/catmaid/CATMAID/issues/1711#issuecomment-374433315, or mute the thread https://github.com/notifications/unsubscribe-auth/AAcFrqVCBFy4Kmr6TD4cz9g_5iJlTQwlks5tgFAPgaJpZM4SxGw0 .

acardona commented 6 years ago

I see the issue in Ubuntu 16.04, where it is reproducible:

In my desktop:

  1. Open the graph widget, add neurons to it.
  2. Click anywhere inside the graph: CPU shoots up massively in the Task Manager.

In my laptop:

  1. Open the Graph widget, add neurons.
  2. Open a second Graph widget, add neurons.
  3. Close the second graph widget: now the first one is slow, and the Tab Manager in chromium shows a CPU stuck.
tomka commented 6 years ago

I am still not able to reproduce that locally (Arch Linux), or I am misunderstanding the nature of this slowness. I tested with 15, 50 and 250 neurons. For 15 and 50, layouting, moving nodes, zooming, panning, grouping and selecting is fast. With 250, layouting takes a few seconds and selecting a node almost a second. Zoom works still relatively well with 250 neurons. Are all operations slow for you?

I also tested updating to the latest Cytoscape 2.7 release (2.7.29), but this didn't change anything fore me. I will test this update a bit more and push it to dev later, maybe it changes something for you. There shouldn't be any breaking change. Updating to version 3+ seems a little bit more involved.

I quickly profiled Graph Widget updates and the most time seems to be spent inside Cytoscape's render methods (e.g. drawCachedElement).

tomka commented 6 years ago

Are you still seeing a slow Graph widget?

acardona commented 6 years ago

A slow graph widget is still an issue. We could reach out to the cytoscapejs devs and ask them if the newer major version addresses this for high-res displays.

On Aug 6, 2018, at 2:04 AM, Tom Kazimiers notifications@github.com wrote:

Are you still seeing a slow Graph widget?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.