Go to file
Louis du Verdier edd983071e Android: Improve loading speed of individual assets
This change improves the loading speed of files stored in Android assets
folder by caching the information about files already opened.

Prior to the change, when creating a QFile or QFileInfo to an asset
file, the engine would first scan all the file's directory and parent
directories in order to cache all this in FolderIterator::m_assetsCache.
Due to the nature of Android assets, it might be very slow, depending on
the number of images in this tree.

In this patch, individual file accesses will stop using FolderIterator
and will simply open what is asked, caching the information about the
resource in order to avoid to have to call the expensive
AAssetManager_open if the file is accessed again (e.g. by QFileInfo).

Fixes: QTBUG-101161
Change-Id: Iaedf4cdf83d5116053b51895a6795d43bc60f942
Pick-to: 6.4 6.3 6.2 5.15
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-06-15 18:23:12 +02:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
bin CMake: Automatically use Xcode generator in qt-cmake + iOS 2022-05-20 13:06:00 +02:00
cmake modulecppexports.h.in: re-indent nested preprocessor directives 2022-06-14 03:30:48 +02:00
coin CMake: Move all CMake Coin builds to be out-of-source 2022-06-10 12:27:01 +00:00
config.tests CMake: Test the linker too for -mno-direct-extern-access 2022-05-25 16:29:31 -07:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Doc: Fix typo in the online documentation template 2022-05-31 10:41:36 +02:00
examples Remove unnecessary dependency to OpenGL 2022-05-30 11:03:19 +03:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
LICENSES Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
mkspecs wasm: don't enable specialHTMLTargets by default 2022-06-01 13:52:47 +02:00
qmake qmake: Document Xcode behavior when bundling translation files 2022-06-14 15:45:06 +02:00
src Android: Improve loading speed of individual assets 2022-06-15 18:23:12 +02:00
tests Make two QDT benchmarks data-driven and add more rows 2022-06-15 08:57:20 +02:00
util CMake: Fix typos 2022-06-13 15:37:36 +02:00
.cmake.conf Bump version to 6.5.0 2022-06-06 13:23:59 +03:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Assume qhelpgenerator in libexec instead of bin 2021-11-08 19:27:32 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt Use REALPATH based check for symbolic links on Windows 2022-01-07 14:31:38 +01:00
conanfile.py Conan: Don't add 'qt_host_path' automatically when cross-building 2022-06-02 08:33:21 +03:00
config_help.txt C++23/c++2b support 2022-06-08 19:43:34 +02:00
configure Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
configure.bat Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
configure.cmake CMake: Fix typos 2022-06-13 15:37:36 +02:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
qt_cmdline.cmake C++23/c++2b support 2022-06-08 19:43:34 +02:00
sync.profile Remove deprecated qgl.h from sync.profile 2022-06-11 00:42:13 +02:00