News for hackers. Stuff that matters.
Re:Show HN: Git Heat Map – a tool for visualising git repo a... by nonethewiser on Saturday January 28, 2023 @11:50PM (#34565054)
How much faster are your benchmarks using WAL mode? https://www.sqlite.org/wal.html
Re:Show HN: Git Heat Map – a tool for visualising git repo a... by avinassh on Sunday January 29, 2023 @01:21AM (#34565484)
I was experimenting with increasing the write throughput on SQLite, and I wrote a blog post [0]. I am sure those learnings can be applied to make it faster

[0] - https://avi.im/blag/2021/fast-sqlite-inserts/

Re:Show HN: Git Heat Map – a tool for visualising git repo a... by avinassh on Sunday January 29, 2023 @02:33AM (#34565796)
I experimented earlier to push the limits of SQLite inserts and wrote a blog post[0] about it. We can apply some of the learnings here.

I reviewed the OP's code and did some benchmarks; SQLite is not the bottleneck here. The code first generates the commit info from the git log, prints that to stdin [1] and the python script reads from it one by one in a loop [2]. Each of the commit info is written to SQLite. So, with or without WAL, the time is almost the same.

I believe the git log will be fast anyway, so other ways to make it faster would be to read a bunch of commits at once and then do batch inserts. We can also make it run in parallel since each commit info is independent, and we don't need to care about ordering while inserting.

[0] - https://avi.im/blag/2021/fast-sqlite-inserts/

[1] - https://github.com/jmforsythe/Git-Heat-Map/blob/bd9bc22/git-...

[2] - https://github.com/jmforsythe/Git-Heat-Map/blob/bd9bc22/git-...

Re:Show HN: Git Heat Map – a tool for visualising git repo a... by jmforsythe on Sunday January 29, 2023 @06:01AM (#34566963)
Unfortunately the commit info is not independent at the moment, and that is mostly due to wanting to track renaming/deletion of files.
Re:Show HN: Git Heat Map – a tool for visualising git repo a... by nonethewiser on Sunday January 29, 2023 @11:15AM (#34569434)
Nice work, thank you for the analysis