libdnss-db opens and closes the DB file each time. This is normally not an issue as the DB files are small. This results in considerably poor performance when the DB files large (e.g. in an environment with 20k lines of DB file, the performance was 40times compared to keeping it open for processing all lines). Rather than re-opening for scanning each line, the file can be kept open for each call into libnss as proposed in [1]. Reported elsewhere: [0] https://bugs.launchpad.net/ubuntu/+source/libnss-db/+bug/2121543 [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101371
Created attachment 16429 [details] Proposed patch Attaching the proposed patch here. Also sent to glibc-alpha.