Made some progress. Lots of clean up (cells are managed in a proper class now instead of in a collection of STL-containers). The core problem of #28 has been solved too. We can now access references via the ID even when the reference is not in an active cell.
This is kinda slow though. Unfortunately the structure of the ESM/P files does not allow for more improvements. I still have something in the queue, but that will only improve the memory consumption, not the speed.
The advantage of my implementation (over the original MW implementation) is, that you will only pay for this feature when it is actually used (and even then only as much as absolutely needed). In Morrowind.esm that happens rarely (e.g. when starting a new game). The difference is quite noticeable. When you run OpenMW without the --new-game switch, you still get the lightning fast start up. With --new-game on the other hand you get a delay of several seconds.
I guess the long loading times of MW are a thing of the past from now on.
Cell Handling Improvements (Issues #28, #31)
Re: Cell Handling Improvements (Issues #28, #31)
Woooo!Zini wrote:I guess the long loading times of MW are a thing of the past from now on.
- Star-Demon
- Posts: 73
- Joined: 11 Aug 2011, 03:17
- Location: New York
- Contact:
Re: Cell Handling Improvements (Issues #28, #31)
Yes, but do the statics point the right way?
Good work, though. The cell loading was the most obvious loading time in the game.
Good work, though. The cell loading was the most obvious loading time in the game.
Re: Cell Handling Improvements (Issues #28, #31)
Just so we are not misunderstanding each other here: My work is exclusively related to the cell data structures. This will affect the load time when starting up MW/starting a new game/loading a game (and probably saving too). The slowdown at changing cells is mostly rendering-related and will be addressed post 1.0 (probably via some kind prefetching in a background thread).
Re: Cell Handling Improvements (Issues #28, #31)
Contrary to what I wrote before the memory usage optimisation also gave us another speed improvement. Even starting a new game is fast again now. This should teach me not to rely on my guts instead of a profiler when making performance predictions.
Re: Cell Handling Improvements (Issues #28, #31)
And #31 is down too now. Went for a long swim without any signs of crashing or other problems.