From ebd515705cd44f744240e095a723a476fb6a95ef Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 15 Jan 2017 15:28:55 +0000 Subject: When looking up macro values while the macro tables are being built in makewhatis(8), use ohash rather than linear searches. This was identified as the main makewhatis(8) performance bottleneck by Baptiste Daroussin , who also suggested part of the improved algorithm. This reduces the run time of "makewhatis /usr/share/man" from eleven to five seconds on my notebook. Note that the changed code is not used in apropos(1), so don't expect speedups there. While here, sort macro values asciibetically, to improve reproducibility - which still isn't perfect, but getting better. --- Makefile.depend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.depend') diff --git a/Makefile.depend b/Makefile.depend index 8a35ac71..af1255de 100644 --- a/Makefile.depend +++ b/Makefile.depend @@ -17,7 +17,7 @@ compat_strlcpy.o: compat_strlcpy.c config.h compat_strsep.o: compat_strsep.c config.h compat_strtonum.o: compat_strtonum.c config.h compat_vasprintf.o: compat_vasprintf.c config.h -dba.o: dba.c config.h mandoc_aux.h mansearch.h dba_write.h dba_array.h dba.h +dba.o: dba.c config.h mandoc_aux.h mandoc_ohash.h compat_ohash.h mansearch.h dba_write.h dba_array.h dba.h dba_array.o: dba_array.c mandoc_aux.h dba_write.h dba_array.h dba_read.o: dba_read.c mandoc_aux.h mansearch.h dba_array.h dba.h dbm.h dba_write.o: dba_write.c config.h dba_write.h -- cgit v1.2.3-56-ge451