I've found that the roOneLineDialog seems to eat up a lot resources while it's running, particularly if showing the busy animation. The following example illustrates this very well...
dialog = CreateObject( "roOneLineDialog" )
dialog.ShowBusyAnimation()
dialog.SetTitle( "Please wait..." )
dialog.Show()
' do initialization stuff
keyboard = CreateObject( "roKeyboardScreen" )
keyboard.SetMessagePort( CreateObject( "roMessagePort" ) )
keyboard.AddButton( 0, "OK" )
keyboard.Show()
While true
msg = wait( 0, keyboard.GetMessagePort )
If msg.IsButtonPressed() Then
Return
End If
End While
When you run the above code, you'll find that the cursor is extremely sluggish when moving around the keyboard. The obvious solution is to Close() the dialog before entering the while loop, but all other screens seem to stop processing when they lose focus, while the dialog doesn't. I have some screens in my app that take a few seconds to paint, so closing the dialog before the screen paints isn't very smooth from a UI perspective. I've gotten around it by passing the dialog to my custom screen, so it can close it before entering its wait loop, but I'm curious as to why it behaves the way it does.
TheEndless
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)