On Mon, Nov 13, 2017 at 11:50 PM, Julian Andres Klode <j...@debian.org> wrote: > (forwarding this to ubuntu-devel-discuss and Zygmunt) > > On Mon, Nov 13, 2017 at 10:33:39PM -0800, Shawn Landden wrote: >> Package: command-not-found >> Severity: wishlist >> >> I re-wrote command-not-found to get rid of the python dependancy, and >> to reduce the database size, as to reduce memory usage. >> >> https://github.com/shawnl/command-not-found >> >> I was preparing to upload it to mentors as command-not-found-ng > > I also rewrote it years ago, but using the same database format, > just in C. It was a lot faster. I don't understand the memory usage > bit - it should not matter how large the database is, it's memory > mapped, and not read into memory, as such memory usage should be > roughly constant. > > Questions/Comments for your approach: > > * Did you test your format on a slow HDD with caches dropped? It > must not be slower than the Python one (that one is way too slow > already) - I did, it seems to be faster (0.4 vs 0.68 seconds) > - I believe the database-based C rewrite was even much faster, > though. I switched it to mmap() and am now getting 0.27-0.45 with caches dropped, even after adding translations. It is 100% C and sh. (same postinst and postrm)
Ping. -- Ubuntu-devel-discuss mailing list Ubuntu-devel-discuss@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss