Are you firing all your requests at once and not sending and polling each one as it comes in? It performs best when you let it fly - blast your requests all at once if you only have a hundred at standard poster sizes, and if you must page, page at the largest amount you can based upon performance, and don't send/poll for each request. What works well for me is to create a queue or table using an associativearray, load them on and pop them off as a service. No matter how you do it the request object must survive from send to receive, so you have to include it in your table or assign it to a structure member that goes into the table. I use structures or small classes that define what is to be done with the information. But below is
some pseudo code that gives the general idea. And lastly if you are drawing right when you receive them, then you need to make sure that everything that is time
consuming is done outside, or you will block. Font creation is very time consuming and drawtext can be if you use a lot of it
'
for i = 0 to myUrlCount - 1
TRequest = CreateObject( "roTextureRequest", someUrl[ i ] )
TextureID = TRequest.GetID().ToStr()
myList.AddReplace( TextureID, { Request: TRequest, ServiceA: a_ItemA, ServiceB: a_ItemB } )
myTManager.RequestTexture( TRequest )
end for
In your event handler just look up the code
' Process the message to get your bitmap, check for errors etc
' Then locate it in the table and pass it along or draw it
l_ID = msg.GetID().ToStr()
l_request = myList.LookUpCI( l_ID )
l_request.ServiceA.DoSomethingWith( theBitmap )
' Delete the key
myList.Delete( l_ID )
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )