MortenTobiasNielsen / Factorio-TAS-Generator

This is an attempt to create a helper tool for Tool Assisted Speedruns in Factorio. A guide of how to use the tool can be found here: https://www.youtube.com/watch?v=V9tuNoDqc0E&t
MIT License
13 stars 4 forks source link

Improved performance of open tas #298

Closed theis999 closed 1 year ago

theis999 commented 1 year ago

Test

I did some test on open TAS with 204k rows. In my test it took 37-39 seconds to load all those rows. The 2 steps that contributed the most was PopulateStepGrid (17s) and OpenTas::extract_steps (19s)

Using beginBatch & endBatch reduced PopulateStepGrid from ~17 seconds to ~10 seconds. So reducing that by 40%.

Changing the Capitalize function, so it didn't implicitly convert segments strings from std::string to wxString before converting them back std::string. Improved the extract_steps step from ~19s to ~10s.

Bias

My test was using 100 copies of my new steel axe run, which obviously isn't a real example of a run. It is majorly skewed towards take and put tasks.