marcusvolz / strava_py

Create artistic visualisations with your exercise data (Python version)
MIT License
152 stars 18 forks source link

Cache processed activities #42

Closed hugovk closed 5 months ago

hugovk commented 6 months ago

This speeds up the "Processing data..." step by caching the generated Pandas dataframe as a pickle file on disk.

For example, with an 8-core Mac, processing all my 3,699 GPX files takes 34s on first pass and creates a 305 MB cache file on disk (the GPX files are 822 MB). For the second run, it takes less than 2s to load the cache file.

For 580 GPX files from 2023, it takes 4s on first pass to create a 50 MB file.

Also add some type hints.

marcusvolz commented 5 months ago

Fantastic!