Open selfhoster1312 opened 4 months ago
md5 is slow...
Honestly I very much doubt that md5 hashing is the issue ... just look at the call to yunohost settings get
etc from the bash hooks ...
Added benchmarks from an actual Raspberry pi running the two versions (Python/Rust).
I placed a "bug" label because it's unbearably slow even on a really fast machine.
There's a ton we can do to make it faster... i've been digging into the source code and so far i've found:
for category, conf_files in _get_pending_conf(names).items(): conf_hashes = _get_conf_hashes(category)
I have yet to properly benchmark this on a raspberry pi, but on x86, a naive (not optimized) reimplementation in Rust gets:
I haven't reimplemented the rest of regenconf (yet), but there's not a lot of big features missing (syntax coloring, custom log sharing..) which i don't think is as important as running fast (and could be reimplemented if really needed). Two orders of magnitude of slowness (x100) is quite a big deal! :(