stats.sh: process files in memory instead of on disk
authorMichael Lohmann <redacted>
Sat, 2 Aug 2025 21:26:50 +0000 (23:26 +0200)
committerMichael Lohmann <redacted>
Sat, 2 Aug 2025 21:35:25 +0000 (23:35 +0200)
commitdd9bd42f521068a8a91978a73291fe9eca1e4c22
treedeedd93f75b690d846b7ab053cda4b1814d5f613
parent484bb922dd8745f8420a1fc527485d024b8ad83b
stats.sh: process files in memory instead of on disk

Writing the file to the filesystem for all tags is unnecessary if the
content can just be parsed in memory. This improves the performance:

Here the output of `time ./stats.sh`:

old
./stats.sh  5.96s user 26.53s system 94% cpu 34.533 total

new
./stats.sh  5.85s user 22.86s system 102% cpu 28.040 total

So a reduction of 6.5s (23%) is achieved even on a computer with a
decent SSD.
stats.sh
git clone https://git.99rst.org/PROJECT