Jump to content


XMLLoader issues in release builds on JS/AS3 container

Recommended Posts

My group of coders build/deploy flash games to several different sites, and it's usually fairly straightforward.  One of these sites used to have a flash-based container that would load in our games, and it worked fine.  But the people on that team who knew AS3 left, so they made a new container that is primarily javascript, with a thin AS3 shim to load in the games.  This works fine for debug builds, but things slow down to a crawl when we try release builds (load times go from 30 seconds or so to over ten minutes).  Their old container doesn't have an issue with release builds.  This week was our company's hackathon, so I decided to delve into this and see what I could find.


We do our game asset loading using XMLLoader to load in a couple xmls (one at a time) that have MP3Loaders and SWFLoaders in them.  The behavior I was seeing in the release builds was that it would load the xml, wait about 90 seconds, then audit the child loaders for size, wait another 90 seconds or so, then load in the children, sometimes taking breaks between children.  Prior to this week, none of them had estimatedBytes vars in the loader definitions in the xml.  So, I added estimatedBytes to the first file that just had a MP3Loader wrapped in a LoaderMax block, and it zipped right along, leading me to believe that I'd found at least a way to fix things.  But adding estimatedBytes to the second xml where all the children were individual SWFLoaders didn't reduce the lag with the second file at all.  I tried updating the greensock swc on the games side (we had a version from late 2013), and besides requiring some very minimal refactoring based on changes in the api, that didn't appear to help the issue either.  I also tried upping the maxConnections for the second XMLLoader, grouping all the SWFLoaders into a single LoaderMax bundle, and turning off the integrateProcess flag for the SWFLoaders (though this may or may not have been done in the right place, will probably try adding this to the xml lines next), but all to no avail.


As these are very large projects, copying and pasting snippets seems unproductive, but I'm just wondering if you have any other ideas I should be trying.  I know the JS layer is using greensock for something, but after sifting through the codebase for it, nothing jumped out at me as even remotely related.  Any of this sound even remotely familiar to something you've run across?

Link to comment
Share on other sites

Sorry, I haven't heard of anything in LoaderMax causing an inordinate amount of delay (60 - 90 seconds) between loads or audits. It sounds very strange indeed. 

LoaderMax has been largely un-touched for quite awhile so its unlikely that a bug of this severity has crept in. 

I really can't imagine what this new "js layer" is doing that would cause that type of lag either.

Wish I had better news for you, but I'm pretty low on ideas :(

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.