Startup delay after project loads in Simulator

I noticed that there is a startup delay in the Corona simulator when a project is loaded. The UI gets rendered very quickly, but often touches don’t register for a significant amount of time (and touches don’t get buffered once the app starts running, which I suppose is a good thing …)

The first tap also seems to have some delay in response in the sample apps’ UI compared to subsequent taps. Not sure if this is because it’s getting triggered somehow before the rest of the app is loaded into memory or something.

What sort of strategy do we take to hide the startup delay? I noticed that Default.png is now supported - I haven’t tried it out with the new build - do we just include alongside the main Lua file? Does the runtime hide Default.png once the app starts, or is there some additional delay while the runtime gets inited?

Is there some Corona callback that’s triggered similarly to the viewDidLoad method once the app is finally ready to run? That would be the most preferable.

Thanks,

  • Ian [import]uid: 238 topic_id: 130 reply_id: 300130[/import]

What sort of delay are we talking about? How many seconds? Are you seeing this in sample code? If not, please send a sample code that repro’s this issue to developer@anscamobile.com

Also, it might not be a delay. It could be that the simulator screen is not updating. There is an intermittent bug where sometimes the simulator screen is not updating on application start. If you move the simulator window, the screen updates.

Last, there is a bug where a click seemingly does not register to the simulator screen. This is b/c the simulator window does not have focus even though the simulator is the foreground process, so the click gets consumed by focus. Could this be what you are seeing?

[import]uid: 26 topic_id: 130 reply_id: 105[/import]

Hi Walter,

I saw it in some of the provided Sample Code projects in the latest drop, but the “Button” sample will show you what I mean. The following repro steps illustrate that it’s not a focus issue, or a screen update issue, but seems specific to the “tap” event.

  1. Position the mouse over Button 1 and hold the mouse in position.
  2. Command-W to close. Command-O to open.
  3. Upon the simulator window being launched, click rapidly on the mouse - the button doesn’t register the tap event until the 3rd or so mouse click.

The delay seems to affect only Button 1’s tap event. Button 2’s touch event seems to respond as soon as the project is opened and Button 3’s newButton utility function responds in a responsive manner.

I noticed this issue also with the tapDots app in the App Store - responses to the taps on the numbers in the app seem a little sluggish - perhaps it’s also using the tap event and not the touch event?

  • Ian [import]uid: 238 topic_id: 130 reply_id: 107[/import]

Forgot to mention that I commented out the assert and printEvent on lines 79 and 81 thinking they might be synchronous and blocking the UI, but nope. Same effect with the lines commented or uncommented.

  • Ian [import]uid: 238 topic_id: 130 reply_id: 108[/import]

Actually, thinking about tapDots a little more - that’s not the same issue. Here I’m talking about a delay in the first response to taps. With tapDots, it seems to be a general sluggishness in response to taps.

  • Ian [import]uid: 238 topic_id: 130 reply_id: 109[/import]