liblcf icon indicating copy to clipboard operation
liblcf copied to clipboard

Use DBArray for all LDB, LMT, and LMU structs

Open mateofio opened this issue 5 years ago • 0 comments

Depends on #379

This PR adds C++20 compatible lcf::Span and a new DBArray array class, which has a similar storage policy and small memory footprint like DBString. It also adds a DBBitArray bit vector replacement for vector<bool>.

This is a WIP, a lot of refactoring is needed in liblcf to get this new Array type working for all the chunks.

Here are some initial numbers where we just convert EventCommand::parameters to use DBArray

Game Ldb Size std::string + std::vector DBString + std::vector DBString + DBArray
HH3 16MB 135.7MB 94.7MB 68.7 MB
Heroes Realm 27MB 301.6MB 204.3MB 143.3 MB
Violated Heroine 11MB 75.9MB 54.6MB 41.4 MB
Yume 2kki 1.4MB 8.0MB 6.0MB 4.9 MB

mateofio avatar Aug 19 '20 03:08 mateofio