Pages: [1]
  Print  
Author Topic: Preloading pages on the sly to get them cached.  (Read 361 times)
Ben
Gaia User
**
Posts: 71


« on: September 01, 2010, 07:12:52 PM »

I've read before about people wanting to preload in pages to avoid the per page loader and so on, with the argument against being that holding the pages in memory is a tax on RAM and once the page has been loaded once, it has been cached and thus the site is nice and speedy -- making the pre-loading partially unnecessary.

So on this idea, is there a way to cunningly load a page early, or whilst GAIA is displaying another page (or intro) and then unload it just to get it cached, so it can avoid the loading bar?

I'd like to do this because there are times when the loading is redundant, and during that time I would like to use it to background load parts of the site to make it overall more snappy.

I think I read once about an all assets approach but I would like to keep the transition and structure magic of GAIA pages intact.

Any ideas?

Here's one......

If I make the pages assets of the index and then use on demand loading with them, I can call on them in the background.
When they are loaded, I can unload them again, but the swf will get cached.
As it is the same swf as the page, would this get realised by Flash/GAIA allowing it to use the cached version?

On this train of thought...... if I used any loader to pull in the page.swf would it get cached and recognised as the same as the GAIA page.swf?


Thanks.
Logged
steven
Gaia Author
Administrator
Gaia Evangelist
*****
Posts: 3863


gaiaframework
WWW
« Reply #1 on: September 01, 2010, 08:37:24 PM »

Here's an untested idea, though I think others have done this.

Use preload flow, hijack afterPreload with onlyOnce, goto the new branch, hide the preloader, onAfterPreload goto the current branch and releaseGaia.

Basically, nothing should happen except the address bar might update momentarily.
Logged

Steven Sacks | Gaia Author
Please support Gaia by donating to the project!  Smiley
steven
Gaia Author
Administrator
Gaia Evangelist
*****
Posts: 3863


gaiaframework
WWW
« Reply #2 on: September 01, 2010, 08:39:18 PM »

Another thing people do is make on demand assets with the same src as their pages and just load those instead.
Logged

Steven Sacks | Gaia Author
Please support Gaia by donating to the project!  Smiley
aaronfay
Gaia Novice
*
Posts: 2


« Reply #3 on: December 06, 2010, 12:32:37 PM »

...the argument against being that holding the pages in memory is a tax on RAM and once the page has been loaded once, it has been cached and thus the site is nice and speedy -- making the pre-loading partially unnecessary.

Being a flash developer of about 12 years now, I think the "tax on RAM" assumption is a terrible one for the framework to make.  Shouldn't the developer have the choice about how an application is taxing a system?  What if the pages were very small, only containing a few elements?  Is image processing not very taxing on RAM?  Under the same mindset, shouldn't Adobe then remove the ability to perform taxing operations from the Flash Player?

A developer should have the final say on how applications are optimized.

Aaron Fay



Logged
steven
Gaia Author
Administrator
Gaia Evangelist
*****
Posts: 3863


gaiaframework
WWW
« Reply #4 on: December 06, 2010, 01:56:26 PM »

This has nothing to do with the framework. The framework does no such thing. He's talking about doing something custom.

In other words, you just agreed completely with him, but you also accused Gaia of something it doesn't do.
Logged

Steven Sacks | Gaia Author
Please support Gaia by donating to the project!  Smiley
Pages: [1]
  Print  
 
Jump to:  

TinyPortal v1.0 beta 4 © Bloc