eichin / thok-kphotoalbum-grep

Command-line find/grep for kphotoalbum index.xml files
MIT License
2 stars 0 forks source link

add a sqlite cache? #10

Closed eichin closed 1 month ago

eichin commented 2 months ago

On an x1g9 kpa-grep still takes 2.5s to do anything. My current workflows do a bunch of kpa-grep calls from shell scripts during which the index.xml doesn't change. See how long it takes to just convert on the fly and do subsequent lookups; if it's slow, maybe a --build-cache option that does the build if the cache is absent or stale, and then regardless, use the cache if it's up-to-date (so scripts can force it, and other use benefits if it happens to be present.)

(If the conversion is less than 2x the current speed, just always cache?)