tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/4196-slow-performance-when-dispatching-a-large-number-of-eventsRobotlegs: Discussion 2013-08-30T07:59:44Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/279456682013-07-25T06:35:34Z2013-07-25T06:35:34ZSlow performance when dispatching a large number of events<div><p>Swapping to signals won't make a lot of difference in this case,
I think. I'm pretty certain that one of the views <em>is</em> doing
some heavy lifting.<br>
That said, I wouldn't use Robotlegs for the game itself, but
everything surrounding it: high scores, loading screens, etc. It's
an application framework, not a game framework, and wasn't built
for speed, but to alleviate a lot of the pain that rises when
creating large, modular applications.</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/279456682013-07-25T15:15:18Z2013-07-25T15:43:48ZSlow performance when dispatching a large number of events<div><p>So what would you suggest if this wasn't a game but an
application that simply needed to update its' views every second
(by dispatching an event from the model)? I say this, cause that is
essentially what is happening. This isn't a game in the sense that
it has a bunch of animation, frame updates, moving characters, tons
of objects to track, etc.. It is a resource management "game" so
basically we're just performing calculations on some data and
updating the views with it. So given that, would you still say that
Robotlegs isn't built to handle this type of updating (on an every
second basis)?</p>
<p>If not, any suggestions on other ways I might go about handling
these updates? Also, any pointers on general performance tuning for
RL (i.e. would having less injections in a particular actor improve
performance? ..etc)</p>
<p>Thanks as always!</p></div>Kyletag:robotlegs.tenderapp.com,2009-10-18:Comment/279456682013-07-25T15:26:14Z2013-07-25T15:26:14ZSlow performance when dispatching a large number of events<div><p>Something else must be going on here. You should be able to
dispatch thousands of events every frame before it starts affecting
performance. A couple of hundred events every second should be
entirely negligible. Switching to Signals won't make a difference
in this case. You need to do some performance profiling to see what
is slowing things down.</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/279456682013-07-25T15:27:02Z2013-07-25T15:27:02ZSlow performance when dispatching a large number of events<div><p>Bear in mind that setting text is a very slow operation. Always
check to see that the value has changed before setting the text on
a textfield.</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/279456682013-07-25T15:46:45Z2013-07-25T15:46:45ZSlow performance when dispatching a large number of events<div><p>Yeah, I think that is the next step (performance profiling).
Thanks Shaun (and creynders, what is your first name btw!? Feel
kinda funny always typing creynders haha).</p>
<p>As to your note on textfield updates, I wonder if getting down
to a more base-level text object would improve performance.</p>
<p>Feel free to throw out any other performance gotcha's you might
have!</p>
<p>Thanks again guys!</p></div>Kyletag:robotlegs.tenderapp.com,2009-10-18:Comment/279456682013-07-25T16:27:41Z2013-07-25T16:27:41ZSlow performance when dispatching a large number of events<div><p>Be sure to check the calculations too. Mistakes slip easily
into<br>
loops within loops for instance. First determine what exactly is
causing<br>
the lag, then find out how to improve it.</p>
<p>And my first name is Camille. Yeah, my parents thought it was
funny to give<br>
a female name to their son :)</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/279456682013-07-25T17:06:21Z2013-07-25T17:06:21ZSlow performance when dispatching a large number of events<div><p>Haha. We could give you a gangster ass nickname like "C-Murder"
or "Camilla the Killa" if that helps.. ;-)</p>
<p>I'll check out calculations for sure. I'm also trying to use
Adobe Scout to help with profiling.. Interesting tool (just not
sure what half the data means yet haha).</p>
<p>Thanks again "C-Rex!"</p></div>Kyletag:robotlegs.tenderapp.com,2009-10-18:Comment/279456682013-07-25T17:26:59Z2013-07-25T17:26:59ZSlow performance when dispatching a large number of events<div><p>Hey, hey, it's Camill*e*, not Camill*a*! Don't make it even
worse! ;)</p>
<blockquote>
<p>No, in reality it <em>is</em> a men's name too. Funny thing is,
w/o realizing it,<br>
I did the same to my son Akira. Many people think it's a women's
name.<br>
He'll be receiving a lot of "dear miss" letters too, just as I
did/do.</p>
</blockquote></div>creynders