openmw/components
AnyOldName3 15162a734d Avoid IO in resolveParentFileIndices
In the olden days, we passed it a vector of open ESMReader instances, as they knew the filenames and sizes, so were a convenient source of this knowledge.

When the ReadersCache was introduced as a pool of readers to limit the maximum number of simultaneously open file handles (to avoid going over the OS' limit) it was a poor substitute.
* We iterate over all the earlier readers in order in a double loop, which is the worst case scenario for an LRU pool as once we're past the size limit, we're guaranteed maximum thrashing - the least recently used item is the most likely to be used next, so the worst to evict.
* We didn't want to read any ESM files, just know whether they'd been read and what their sizes were, so didn't want to open a file handle, which the ReadersCache forced us to do.

Obviously, opening lots of file handles isn't fast, and as this was an operation done for each content file which iterated over the file's masters and within that loop iterated over every loaded file, that's O(n^3) complexity in the worst case, and for things like delta plugin merged plugins, they hit the worst case in long load orders.

This resolves the freeze reported as https://gitlab.com/OpenMW/openmw/-/issues/8425, but there may be other freezes on launch.
2025-04-10 16:16:19 +01:00
..
bgsm Merge branch 'nifmisc' into 'master' 2024-04-25 08:45:36 +00:00
bsa Clarify Fallout 4 next gen update BA2 version naming 2024-04-28 05:09:40 +03:00
bullethelpers Remove unused includes 2022-10-09 16:44:18 +02:00
compiler CI match script names and remove dead code 2024-07-01 16:57:40 +02:00
config Add progress bars where the launcher can be limited by IO 2025-04-09 01:36:52 +01:00
contentselector Don't precompute load order errors after every change 2025-04-08 01:19:24 +01:00
crashcatcher Use proper order for printf arguments 2024-07-28 20:08:02 +02:00
debug Support max log level for Recast via env variable 2025-03-21 15:34:47 +01:00
detournavigator Reduce a chance to have a deadlock in the AsyncNavMeshUpdater 2025-03-23 23:33:40 +01:00
esm Work around a regression in MSVC 2024-12-09 17:23:17 +01:00
esm3 Avoid IO in resolveParentFileIndices 2025-04-10 16:16:19 +01:00
esm4 Skip SLSD, SCVR, SCRV subrecords in QUST record 2025-03-15 13:11:26 +01:00
esmloader Gets rid of most ESM::CellId 2023-04-03 14:16:05 +02:00
esmterrain CLEANUP(CS): Do heightData check in actual implementation, revert 2024-06-10 02:02:31 -05:00
fallback Cleaner implementation 2024-06-07 18:38:32 -07:00
files Use non-deprecated known folder API 2025-03-25 01:32:44 +00:00
fontloader Merge branch 'fontexport' into 'master' 2025-03-27 11:04:35 +00:00
fx Fix multiview use in techniques 2025-01-26 16:26:36 +01:00
interpreter Exit with fatal error on duplicated instruction code 2024-06-28 22:24:24 +02:00
l10n Use normalized path in l10m manager 2024-08-18 21:07:46 +02:00
loadinglistener Drop 360-degree screenshot support (#7720) 2024-06-06 14:46:01 +03:00
lua Fix msvc warnings 2025-03-09 17:55:17 +01:00
lua_ui Ensure class members are tied to the main Lua state 2025-03-03 19:37:07 +01:00
misc Use normalized path for correctMeshPath 2024-11-16 12:49:11 +01:00
myguiplatform Replace toNormalized by Normalized 2024-09-18 23:53:20 +02:00
navmeshtool Stop updating navmeshtool progress on first bad message 2023-01-27 19:10:53 +01:00
nif Optimize NIF boolean vector reading 2025-02-07 04:55:06 +03:00
nifbullet Use normalized path in BulletShapeManager 2024-09-27 23:33:58 +02:00
nifosg Allow skinned plants to be harvested 2025-04-06 11:01:26 +02:00
platform Remove vestigial Boost libraries 2024-08-23 14:06:13 +01:00
process Do not include formatting spaces to localizable strings 2023-11-30 13:06:50 +04:00
resource Merge branch 'vfs_normalized_path_22' into 'master' 2024-12-01 21:45:01 +00:00
sceneutil Give point lights a minimum radius of 16 2025-03-24 22:14:08 +03:00
sdlutil Silence SDL3 window/display events coming from SDL2-compat 2025-02-04 20:30:19 +03:00
serialization Add missing array include 2023-07-29 00:29:03 +02:00
settings Add an option to match sunlight to the sun (#8032) 2024-12-28 18:29:35 +03:00
shader Don't expect TangentSpaceGenerator to work without texcoords 2024-10-24 13:36:49 +01:00
sqlite3 Minor header cleanup 2023-04-30 16:26:03 +02:00
std140 Add missing array include 2023-07-29 00:29:03 +02:00
stereo Do not copy due to auto misuse 2024-01-07 18:52:10 +04:00
terrain Allow opting out of water culling (#7318) 2024-10-31 14:54:05 +03:00
testing Use temporary directory for tests output 2025-03-23 23:33:40 +01:00
to_utf8 Do not use no longer supported std::char_traits 2025-03-11 20:32:36 +03:00
translation Use string_view in more UI code 2023-05-21 18:14:12 +02:00
version Open matching version of documentation for Launcher Help 2024-02-25 18:20:40 +01:00
vfs Forbid to use toNormalized for normalized path 2024-11-18 21:21:33 +01:00
widgets Address my own review concerns 2024-09-19 04:05:54 +03:00
CMakeLists.txt Move from qt_wrap_ui to AUTOUIC for qt components lib 2024-11-10 20:38:14 +01:00
doc.hpp second set of additional doxygen comments 2010-09-25 20:15:05 +02:00