My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 287: Patch for /trunk/as3/trunk/src/org/papervision3d/objects/parsers/KMZ.as
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by raryel.c...@gmail.com, Jun 10, 2012
Summary: Patch related with unnecessary uncompressing of data. 
Benefit: significant decrease of model loading time

Details: 
1 - First change: 
Function getColladaFromZipFile(). In the way it was implemented, all the data from the kmz file was being unzipped (including textures) to get the dae file. As the objective of the function is just to get the collada file, just the DAE file needs to be unzipped. As the function was also loading the textures (and not using them later) it was wasting processing time.

2 - Second change: 
Function parse(). In the way it was implemented, for loading the textures all data from the kmz file was being unzipped (including the DAE file). As just the textures are needed, only them have to be unzipped. As the function was also loading the dae file (and not using it later) it was wasting processing time. 

3 - Third change: 
Function numTexturesInZip(). It's is not necessary to unzip data to count how many textures are found on the KMZ file. It's just necessary to check the entries strings, without unzipping anything.

I made some performance tests on here, and this changes I made on the KMZ class decrease significantly the model loading time. For example, a complex model of 1.6MB initially need about 18 seconds to load. After the modifications it just needs about 8 seconds to load.
KMZ.as.patch
1.7 KB   View   Download
Sign in to add a comment

Powered by Google Project Hosting