sourcegraph/thyme

Use SQLite instead of JSON

dufferzafar opened this issue · 1 comments

Wouldn't sqlite be a better choice to store the data as compared to json?

To add new entry to json, we first need to parse the existing file. Whereas, considering our usecase, we just need something that works easily in an append-only fashion.

That may be true, but so far, performance of updating the JSON file has not been an issue. Also, SQLite is a fairly heavy dependency to bring in. If the perf of thyme track becomes an issue, I'd be receptive to PR that changes the write to append-only, but in my mind, this should probably still hit the filesystem (e.g., every line in a file could correspond to a track snapshot).