Cell Handling Improvements (Issues #28, #31)

Everything about development and the OpenMW source code.
Post Reply
User avatar
Zini
Posts: 5537
Joined: 06 Aug 2011, 15:16

Cell Handling Improvements (Issues #28, #31)

Post by Zini » 22 Sep 2011, 12:00

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.

User avatar
raevol
Posts: 3054
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Cell Handling Improvements (Issues #28, #31)

Post by raevol » 22 Sep 2011, 19:17

Zini wrote:I guess the long loading times of MW are a thing of the past from now on.
Woooo!

User avatar
Star-Demon
Posts: 73
Joined: 11 Aug 2011, 03:17
Location: New York
Contact:

Re: Cell Handling Improvements (Issues #28, #31)

Post by Star-Demon » 22 Sep 2011, 22:41

Yes, but do the statics point the right way? :P

Good work, though. The cell loading was the most obvious loading time in the game.
"The scientists of today think deeply instead of clearly. One must be sane to think clearly, but one can think deeply and be quite insane." - Nikola Tesla

User avatar
Zini
Posts: 5537
Joined: 06 Aug 2011, 15:16

Re: Cell Handling Improvements (Issues #28, #31)

Post by Zini » 23 Sep 2011, 09:03

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).

User avatar
Zini
Posts: 5537
Joined: 06 Aug 2011, 15:16

Re: Cell Handling Improvements (Issues #28, #31)

Post by Zini » 24 Sep 2011, 10:49

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.

User avatar
Zini
Posts: 5537
Joined: 06 Aug 2011, 15:16

Re: Cell Handling Improvements (Issues #28, #31)

Post by Zini » 27 Sep 2011, 09:25

And #31 is down too now. Went for a long swim without any signs of crashing or other problems.

Post Reply