]> git.sesse.net Git - plocate/commit
Hold compressed filenames more efficiently in memory.
authorSteinar H. Gunderson <steinar+git@gunderson.no>
Mon, 28 Sep 2020 07:54:49 +0000 (09:54 +0200)
committerSteinar H. Gunderson <steinar+git@gunderson.no>
Mon, 28 Sep 2020 07:54:49 +0000 (09:54 +0200)
commit2a384dd69942e36f491ada0add6e2c5225b14a32
tree69605f9ea05236465f7788dc735100ef5d4edbc8
parent1bb5df65bf76c5a2dff0c6e69f38cdcb9d884d69
Hold compressed filenames more efficiently in memory.

std::string::resize() will rarely give memory back, so allocate
the string with the right size to begin with. This means we don't
carry around a lot of slop, saving ~15% RAM during build.
plocate-build.cpp