[Commits] [wesnoth/wesnoth] bb2d79: improve listbox::clear() performance.
GitHub
noreply at github.com
Thu Apr 13 00:07:31 UTC 2017
Branch: refs/heads/gfgtdf-patch-1
Home: https://github.com/wesnoth/wesnoth
Commit: bb2d79e5f033d4852680f27ab132b3d5241e0d78
https://github.com/wesnoth/wesnoth/commit/bb2d79e5f033d4852680f27ab132b3d5241e0d78
Author: gfgtdf <daniel.gfgtdf at gmail.com>
Date: 2017-04-13 (Thu, 13 Apr 2017)
Changed paths:
M src/gui/widgets/listbox.cpp
Log Message:
-----------
improve listbox::clear() performance.
previously listbox::clear() removed all elements one by one.
This was quite ineffective since due to the listbox always-one-element-selected behviour this required calculating which is the next element in this list in the current order. Which then again requires resorting of the whole list since due to the list content change (removal) the order cache is cleared.
this could also fix https://gna.org/bugs/?25504
More information about the Commits
mailing list