basigek / simbrain

Automatically exported from code.google.com/p/simbrain
0 stars 0 forks source link

Disabling GUI does not disable _all_ GUI updates #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Open VisualVM or some other profiling software which performs CPU sampling. 
If possible sort by CPU time rather than base method time.
2. Create a medium sized network (~300 neurons a few thousand synapses).
3. Turn off the GUI via unchecking View > property tabs > guiOn
4. Observe profiler.

While the update is substantially faster than with the GUI on, the profiler 
indicates that org.piccolo2D.nodes.PText.computeNextLayout() is taking 9x the 
amount of time as the next most intensive method: the actual model neuron 
update. That is for a network of the above size 
org.piccolo2D.nodes.PText.computeNextLayout() is taking 90% of the total 
computation time.

A cursory investigation has revealed that checking or unchecking guiOn does not 
change NetworkPanel's guiOn variable, which could then be used to prevent 
certain GUI updates when guiOn is false. Rather the checkbox only alters the 
guiOn variable of the NetworkComponent (a workspace component) which contains, 
but has no reference to the NetworkPanel and thus its guiOn variable is 
unchanged.

This means that there is already a path to resolving this issue, but it is 
unclear if this is the best way. A developer meeting is probably warranted.

The sheer magnitude of this performance drain makes this very high priority.

Related to issue 9: http://code.google.com/p/simbrain/issues/detail?id=9 

Original issue reported on code.google.com by ZachT...@gmail.com on 26 Jul 2014 at 9:46

Attachments:

GoogleCodeExporter commented 9 years ago
Also there are a number of performance enhancements that could be made to the 
gui updating process independent of this. One of such would be to implement an 
enum based updating system as in r3063 but for GUI updating to avoid instanceof 
checks. This is secondary to the central issue but worth mentioning as a side 
note.

Original comment by ZachT...@gmail.com on 26 Jul 2014 at 10:15

GoogleCodeExporter commented 9 years ago

Original comment by ZachT...@gmail.com on 12 Jan 2015 at 5:31