widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #04453
Re: [Merge] lp:~widelands-dev/widelands/bug1503949 into lp:widelands
I took the information that is_loaded could be correct from its description:
/**
* \return \c true if the game is completely loaded and running (or paused)
* or \c false otherwise.
*/
Also, I had logging messages (which I removed before committing) in both branches, and while loading, it runs only once (per warehouse) into the alternative branch (is_loaded() returning false), and always when destroying a warehouse in game (either self, or by enemy), it uses the branch by is_loaded() returning true.
So yes, it *does* work.
In the cleanup_for_load() part the game is *not* really running. And in the cleanup part, when we come to Warehouse::clean, we "shortcut" the cleanup to just removing all workers regardless of their state.
My laptop is quite fast, but even I see the difference, but now, for proving, I just now measured it:
Loading the long-time savegame from the bug, measuring starting from OK at the load menu, until the game has fully appeared.
trunk: 35s
trunk, this change merged: 14s
Also, ending a game like this one takes much longer without the branch merged. You did find the right spot of slowness.
I think for more "generic computers" (not development machine) we can assume a difference of minutes here.
--
https://code.launchpad.net/~widelands-dev/widelands/bug1503949/+merge/274157
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug1503949.
References