hohav / py-slippi

Python library for parsing SSBM replay files
MIT License
56 stars 25 forks source link

Optionally skip frame parsing with the 'skip_frames' option #38

Closed Grantismo closed 2 years ago

Grantismo commented 2 years ago

This PR introduces the optional skip_frame option to the Game constructor (similar to https://github.com/hohav/peppi). This is a noop for all existing callers.

This implementation requires a seekable stream, but again this only impacts callers passing the new option.

Profiling on a sample of 187 replays:

original:
289730206 function calls (289729400 primitive calls) in 234.178 seconds
w/ skip_frames:
185392 function calls (184586 primitive calls) in 0.240 seconds
hohav commented 2 years ago

Closing in favor of #41.