1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-12 16:13:06 +00:00
openmw/components/esm3
elsid 3affe9913f
Limit the number of simultaneously open not actively used content files
Use LRU cache for ESMReaders. When cache capacity is reached close least
recently used ESMReader. Remember the file name if a reader was open. Once the
reader requested again open the file if there is stored name for it. Put
released ESMReader to the back of the free items list. Close ESMReader's from
the front of the free items list.

Cached item can be used only by one client at the same time. If the same item is
requested twice exception is thrown. This should never happen in practice. If
this happens need to fix the client logic.

It's allowed to go over the capacity limit when requesting different readers.
Ideally this should never happen but there will be system error anyway
signalizing about too many open files. Need to fix client logic in this case.

All places that were using a vector of ESMReaders now using the cache. Cache is
local for each use case and there is no need for a thread safety.
2022-06-03 01:29:03 +02:00
..
activespells.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
activespells.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
aipackage.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
aipackage.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
aisequence.cpp Use unique_ptr to manage AiPackage lifetime 2022-02-23 00:39:30 +01:00
aisequence.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
animationstate.cpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
animationstate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
cellid.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
cellid.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
cellref.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
cellref.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
cellstate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
cellstate.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
containerstate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
containerstate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
controlsstate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
controlsstate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
creaturelevliststate.cpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
creaturelevliststate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
creaturestate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
creaturestate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
creaturestats.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
creaturestats.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
custommarkerstate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
custommarkerstate.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
debugprofile.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
debugprofile.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
dialoguestate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
dialoguestate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
doorstate.cpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
doorstate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
effectlist.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
effectlist.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
esmreader.cpp Limit the number of simultaneously open not actively used content files 2022-06-03 01:29:03 +02:00
esmreader.hpp Limit the number of simultaneously open not actively used content files 2022-06-03 01:29:03 +02:00
esmwriter.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
esmwriter.hpp Fix uninitialized coverity warnings 2022-05-01 18:36:16 +02:00
filter.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
filter.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
fogstate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
fogstate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
globalmap.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
globalmap.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
globalscript.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
globalscript.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
inventorystate.cpp Replace empty std::string assignments 2022-05-04 22:33:39 +02:00
inventorystate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
journalentry.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
journalentry.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadacti.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadacti.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadalch.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadalch.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadappa.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadappa.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadarmo.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadarmo.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadbody.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadbody.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadbook.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadbook.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadbsgn.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadbsgn.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadcell.cpp Remove boost::filesystem from bsatool 2022-05-22 18:53:10 +02:00
loadcell.hpp Skip load cell ref when there is no need 2022-04-08 19:16:38 +02:00
loadclas.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadclas.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadclot.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadclot.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadcont.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadcont.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadcrea.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadcrea.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loaddial.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loaddial.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loaddoor.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loaddoor.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadench.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadench.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadfact.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadfact.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loadglob.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadglob.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadgmst.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadgmst.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadinfo.cpp Initialize DialInfo::DATAstruct with the proper blank values 2022-05-15 14:52:44 +02:00
loadinfo.hpp Address feedback on !1857 2022-05-16 17:37:55 +02:00
loadingr.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadingr.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadland.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loadland.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loadlevlist.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadlevlist.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loadligh.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadligh.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadlock.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadlock.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadltex.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loadltex.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadmgef.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadmgef.hpp Address feedback 2022-05-22 09:29:03 +02:00
loadmisc.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadmisc.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadnpc.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadnpc.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loadpgrd.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loadpgrd.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadprob.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadprob.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadrace.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadrace.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadregn.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadregn.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadrepa.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadrepa.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadscpt.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadscpt.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadskil.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadskil.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loadsndg.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadsndg.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadsoun.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadsoun.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadspel.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadspel.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadsscr.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadsscr.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadstat.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadstat.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loadtes3.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
loadtes3.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
loadweap.cpp 0 initialize mRecordFlags 2022-05-29 22:12:30 +02:00
loadweap.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
locals.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
locals.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
magiceffects.cpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
magiceffects.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
mappings.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
mappings.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
npcstate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
npcstate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
npcstats.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
npcstats.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
objectstate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
objectstate.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
player.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
player.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
projectilestate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
projectilestate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
queststate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
queststate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
quickkeys.cpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
quickkeys.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
readerscache.cpp Limit the number of simultaneously open not actively used content files 2022-06-03 01:29:03 +02:00
readerscache.hpp Limit the number of simultaneously open not actively used content files 2022-06-03 01:29:03 +02:00
savedgame.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
savedgame.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
spelllist.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
spelllist.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
spellstate.cpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
spellstate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
statstate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
statstate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
stolenitems.cpp Avoid unnecessary copies 2022-01-28 01:07:27 +01:00
stolenitems.hpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
transport.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
transport.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
variant.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
variant.hpp Avoid string copies for ESM::Variant::getString 2022-03-06 17:38:58 +00:00
variantimp.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
variantimp.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00
weatherstate.cpp Remove ESM:: namespace qualifier in components/esm3/ and tests 2022-04-12 02:04:24 +02:00
weatherstate.hpp move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4 2022-01-23 17:04:48 +01:00