summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qreadwritelock_p.h
diff options
context:
space:
mode:
authorLouis du Verdier <louis.du.verdier@free.fr>2022-03-24 13:35:07 +0100
committerLouis du Verdier <louis.du.verdier@free.fr>2022-06-15 18:23:12 +0200
commitedd983071e0a90ee8665d2f45916fb575fc25857 (patch)
treecef433e610177c4d679c1b16926591d7fded7787 /src/corelib/thread/qreadwritelock_p.h
parentf53f7095044275767e389d16aabad5ff7144ec9f (diff)
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>
Diffstat (limited to 'src/corelib/thread/qreadwritelock_p.h')
0 files changed, 0 insertions, 0 deletions