summaryrefslogtreecommitdiff
path: root/glnx-alloca.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-01-26 08:49:03 -0500
committerColin Walters <walters@verbum.org>2017-01-26 08:53:38 -0500
commit597f03b4058a4d495252ee5479371c0b428fe40f (patch)
tree034357c9700d219377620f4f5dd8a1d480ddef2a /glnx-alloca.h
parentabd37a4790f86f53bfb442e6d80e1710f50bff92 (diff)
downloadlibglnx-597f03b4058a4d495252ee5479371c0b428fe40f.tar.gz
dirfd: Use better and faster random algorithm for gen_temp_name()
I was looking at ostree performance, and a surprising amount of time was spent in `glnx_gen_temp_name()`. We end up calling it from the main loop, and the iteration here shows up in my perf profiles. The glibc algorithm here that we adopted is *very* dated; let's switch to use `GRand`, which gives us a better algorithm. It'd be even better of course to use `getrandom()`, but we should do that in glib at some point. While I had the patient open, I extended the charset with lowercase, to better avoid collisions.
Diffstat (limited to 'glnx-alloca.h')
0 files changed, 0 insertions, 0 deletions