Preloading functions

Feature requests for future versions of Hollywood can be voiced here
Post Reply
User avatar
Allanon
Posts: 732
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Preloading functions

Post by Allanon »

Hi Andreas,
I'd like to post an idea on a method to implement preload/chaching without implement separate thread processes, but internally of course you should handle them asynchronously.

I was thinking about something like:

Code: Select all

; Call an async loading routine for the given filename, if preload_id is Nil means that the Preloading has failed (file not found, etc...)
Local preload_id = Preload(filename)

; Check if the loading has been completed, result can be TRUE or FALSE
Local result = IsLoaded(preload_id)

Then we could use the preload_id as pseudo filename in standard loading routines:

Code: Select all

Local myBrush = LoadBrush(Nil, preload_id)
This could lead to istant loadings in many situations, or at least the wait could be reduced because the program should wait only for the reading completetion:

Code: Select all

...
While IsLoaded(preload_is)
   ...
Wend
Local myBrush = LoadBrush(Nil, preload_id)
Just an idea :)
Could it be possible?
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Preloading functions

Post by airsoftsoftwair »

Of course it's possible but it would require fundamental changes in the Hollywood core so it's not very likely to come :)
Post Reply