I was really disturbed because my application was getting very slow in android. I had a iOS version which was much faster.
My application has a lot of resources (~12000).
It takes less time getting resources which name starts with “a” than resources which name starts “z”.
I realized that, in Android, to get a resource, cocos2d-x uses “CCFileUtils::getFileDataFromZip”, which uses “unzLocateFile” from “support\zip_support\unzip.cpp”. Here, I found this code:
while (err == UNZ_OK)
err = unzGetCurrentFileInfo64(file,NULL,
if (err UNZ_OK)
err = unzGoToNextFile(file);
This code explains why “z**" files take more time than "a**” files…
In iOS I don’t have this problem…
What can I do to optimize resources access?
Thanks in advance