Open lmichaelis opened 1 year ago
Note about load-time performance:
Animation::Sequence::Sequence
in OpenGothic calls for Resources::vdfsIndex().find_entry
twice, making total of 18% of load-time.
One fix is easy - use one call, instead of 2 - that is on me. Yet find_entry
probably can be improved.
Hm that's an interesting profile. I did one about a week ago and it actually showed that vdf_file::merge
takes a long time to run. That is probably related to me using an unsorted Container for vdf_entry::_m_children
. I'm looking into a better solution potentially using a set or a list.
As expected, using a std::set
with a custom, case-insensitive comparator, I see about 80x performance improvement in find_entry
. That's exceptional! I'll have to find a way around std::set
's const lookups but it seems like the only right way of doing things is to deprecate the non-const find_entry
APIs. They could be re-added in the future because I'm planning a rework of the VDFS API anyways.
@Try I'm keeping a bleeding-edge version of OpenGothic with the newest patches at lmichaelis/OpenGothic in the phoenix-bleeding
branch. Feel free to pull/merge from there if you like as well :)
Updated OpenGothic - very nice improvement of load-time performance, thanks!
There is probably a lot of performance left on the table at the moment since it is not really possible to profile most parts of phoenix. Especially the script VM is critical to performance in Gothic re-implementations like OpenGothic.
Writing proper benchmarks will enable easier profiling of phoenix.