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.
Original issue reported on code.google.com by raryel.c...@gmail.com on 10 Jun 2012 at 3:16
Original issue reported on code.google.com by
raryel.c...@gmail.com
on 10 Jun 2012 at 3:16Attachments: