happyleavesaoc / aoc-mgz

Age of Empires II recorded game parsing and summarization in Python 3.
MIT License
197 stars 41 forks source link

Improve header parsing efficiency #60

Closed hiiwave closed 3 years ago

hiiwave commented 3 years ago

Hi @happyleavesaoc, thanks for the awesome repo!

I just tried this project today, and found that the parsing speed for header was surprisingly slow. After digging it a while, I found that the time complexity was high due to unnecessary copy of data array. This patch fixes this issue, thus the parsing speed improves significantly (from minutes to seconds).

Hope this helps 😄

happyleavesaoc commented 3 years ago

Thanks, this is a great fix.