This forum is read only and just serves as an archive. If you have any questions, please post them on

1 decade ago by noar

The value of system lag is 80~100ms on my android phone(HTC Desire).

I do not know which function call cost the time.

1 decade ago by fugufish

normally it's the draw() function. Only fast javascript engines ( like Chrome's v8, Apple's Nitro and others ) seem to make the cut.

1 decade ago by Arantor

Without more details it's hard to do anything. How many entities? Frames per second? Very complex update() methods?

1 decade ago by noar

I have new test on my android phone. When i close the debug util, then the fps is up to 20+ fps. ( 15 entities, map used pre-rendered, and 17 draws ).

So, the system lag in the debug output panel, may be caused by the debug util.

1 decade ago by fugufish

ah okay. the debug panel itself is actually another canvas being drawn. Now it makes sense that FPS drops

1 decade ago by Arantor

It's also not clear what browser is in use, since all the newer browsers do better than older ones (and, frankly, that's one of the disadvantages I've seen with Android: users are far more likely to be stuck on an older browser unless they root the device and update it themselves due to vendor crapware)

1 decade ago by noar

My tested android phone is android 2.3.5a and use the system default browser.

1 decade ago by Arantor

And what's going on in the update and draw functions of the core and the entities that are running?

Diagnosing a fault without much in the way of its symptoms is nigh on impossible :(

1 decade ago by PanTom

As far as I understand the value of the system lag is nothing you can improve by your programming. Here's an explanation from dominic from the introduction of the debug panel feature:

The System Lag metric is also very interesting. This is essentially the time the browser is late to begin processing the next frame. E.g. when the current frame is completely finished after 10ms, the browser should schedule the next frame in 6ms, in order to achieve 60fps.

However, some browser's JavaScript engines need a very long time to free unused memory ("Garbage Collection"), sometimes amounting to a complete halt of the game for 100ms or more. Sadly, there's little you, as a game developer, can do about this - other than complaining to browser vendors.

1 decade ago by Arantor

That's not necessarily true. If the code is fundamentally late because it is too big and complex, it's still going to lag and I would envisage it being listed under that heading simply because it's pushing the frame to be late in rendering - however, the above is quite important to note that there will be things outside your control for performance.

1 decade ago by noar

I understand the reason of the system lag is high on my android phone is caused by the debug util. Because the system lag panel is also draw. So I do nothing else close the debut util. Then the fps is up to 20+ fps from 10- fps.

1 decade ago by Arantor

Yes, it takes a hit. But even 20 FPS is laggy, no?

1 decade ago by robw00t

I've just begun testing my first IG game & have it running on my ipad, iphone4s, and my macbook pro laptop.

The system lag on my laptop is virtually nothing (1-2ms) on my iOS devices the system lag is substantial (40ms+).

Interesting. I'm doing almost nothing in my update method(s). My scene is 2 background layers png & I have two small entities on the canvas.

1 decade ago by Seeders

In cases like this it might be best to take out suspected chunks of code to see what is bogging it down. Any loops or iteration in your update methods might be a good place to start.
Page 1 of 1
« first « previous next › last »