jqnatividad / qsv

CSVs sliced, diced & analyzed.
The Unlicense
2.26k stars 63 forks source link

`stats`: add `--cache-threshold` autoindex creation/deletion logic #1809

Closed jqnatividad closed 3 weeks ago

jqnatividad commented 3 weeks ago

As stats runs much faster with an index as it enables multithreading, when --cache-threshold is negative, it enables autoindex creation when the input's size is greater than the absolute value of the --cache-threshold argument in bytes.

However, some users may not want the index file to hang around after computing stats, so when the --cache-threshold negative arg ends with a 5, stats now also auto-deletes the index file it auto-created.