'AAssetManager_openDir takes long to execute

I have a problem with AAssetManager_openDir method taking long to return. It is not affecting all devices, it looks like it is quite fast on ART devices (only my guess). I've tested it on Nexus 5X - powerfull ART device and on Samsung Galagys S4 mini (low-end dalvik). On Samsung it takes >200 ms for each call of AAssetManager_openDir, which is really long. I understand I cannot really compare Nexus 5X and Galaxy S4 mini, but the performance gap is enormous (S4 mini is more than 50x slower with this method).

Is it something I can do to fix this or will I have to use some workaround without using this method.

PS: methods like AAssetManager_open are much much faster also on S4 mini.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source