Menu

#123 DynaSpot pointing causes high CPU usage

open
zvtm (49)
5
2012-10-24
2011-11-22
mikerofone
No

Hello,

when DynaSpot pointing is activated in ZGRViewer, it causes the application to max out one core of my machine, even if the application is not focused/the mouse not moved. Deactivating DynaSpot pointing resolves the issue, and usage drops to zero.

How to reproduce:

  1. Start ZGRViewer
  2. Open a DOT model using SVG pipeline (CTRL+D)
  3. Enable DynaSpot pointing in settings.

Actual behaviour:
Everything works fine, except one core of my machine is 100% busy after step 3.

Expected behaviour:
CPU usage should be zero as long as no interaction with the application takes place and no repainting is necessary.

Environment:
ZGRViewer v0.8.2, installed via Arch Linux User Repository https://aur.archlinux.org/packages.php?ID=19301
Gnome 3 (fallback mode)
Core i5 2.4GHz processor, 8GB RAM

Problem analysis:
From the symptoms, I guess that the DynaSpot feature causes some busy-wait update loop to start. This should be implemented using an event based mechanism, triggering the painting loop only for MouseMove events and the like. I did not look at code, though.

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB