|
From: | Scott Christley |
Subject: | Re: [swarm-hackers] Help on Heatbugs (Git) |
Date: | Wed, 18 Nov 2009 17:54:12 -0800 |
On Nov 18, 2009, at 4:50 PM, Nima Talebi wrote: Issue Part I Okay, then probably the best thing to do is run one of the performance tools, I think its ObjectAlloc. That will give you an idea of what objects are being allocated and growing.
The better way to do this is don't update the GUI display so often, so in HeatbugsGUI change the display frequency from 1 (which means to update the GUI every single time step) to some larger number like 10. obj->displayFrequency = 1; But you may have missed my main point from the earlier email, you cannot let the simulation continue, while at the same time trying to "probe or query" the simulation (from another thread) to update a display, because the simulation may change its state in the middle of the "query". In the minimal case, your display is just updated with wrong simulation state info. In the worst case, your display attempts to access simulation objects that no longer exist, thus causing an exception.
I'm not sure I understand your paraphrase, why the emphasis on AND? dangerous to call? If the comments in the -updateGraphicalDisplays method don't make any sense, then maybe they need more elaboration so that they do make sense. They make perfect sense to me, but then I wrote them ;-) Scott |
[Prev in Thread] | Current Thread | [Next in Thread] |