aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile.depend
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-15 15:28:55 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-15 15:28:55 +0000
commitebd515705cd44f744240e095a723a476fb6a95ef (patch)
treea4211b2acaf54a3ba3e735a6b118eff9eb7c451e /Makefile.depend
parent118689aa2e6ecb08ee82301bd70a70d41d1fea96 (diff)
downloadmandoc-ebd515705cd44f744240e095a723a476fb6a95ef.tar.gz
mandoc-ebd515705cd44f744240e095a723a476fb6a95ef.tar.zst
mandoc-ebd515705cd44f744240e095a723a476fb6a95ef.zip
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 <bapt at FreeBSD>, 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.
Diffstat (limited to 'Makefile.depend')
-rw-r--r--Makefile.depend2
1 files changed, 1 insertions, 1 deletions
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