NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: misc/54213 (Significant performance degradation of whatis(1) after src/usr.sbin/makemandb/whatis.c,-r1.6)



The following reply was made to PR misc/54213; it has been noted by GNATS.

From: Leonardo Taccari <leot%NetBSD.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: misc/54213 (Significant performance degradation of whatis(1) after src/usr.sbin/makemandb/whatis.c,-r1.6)
Date: Sat, 18 May 2019 12:11:47 +0200

 Hello Abhinav,
 
 abhinav%NetBSD.org@localhost writes:
 > Synopsis: Significant performance degradation of whatis(1) after src/usr=
 .sbin/makemandb/whatis.c,-r1.6
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: abhinav%NetBSD.org@localhost
 > State-Changed-When: Sat, 18 May 2019 07:58:39 +0000
 > State-Changed-Why:
 > Could you give the committed changes a try and see if it improves things=
 ?
 
 Sure!
 
 Redoing all the tests with whatis-1.5, whatis-1.7 and whatis-1.8.
 First I've prepared a man.db prior today commit using a
 `/tmp/man.conf.old', redoing the tests for whatis -r1.5 and -r1.7:
 
  % time sh -c 'for i in $(seq 10); do { ./whatis-1.5 -C /tmp/man.conf.old =
 foo 2>/dev/null; } done'
  0.089u 0.234s 0:00.32 96.8%     50+1863k 0+0io 120pf+0w
 
  % time sh -c 'for i in $(seq 10); do { ./whatis-1.7 -C /tmp/man.conf.old =
 foo 2>/dev/null; } done'
  28.916u 2.403s 0:31.31 100.0%   0+15k 0+0io 120pf+0w
 
 ...then I've `cvs up' today changes, locally rebuilt makemandb and
 whatis and prepared a man.db using a `/tmp/man.conf', tests for
 whatis -r1.8:
 
  % time sh -c 'for i in $(seq 10); do { ./whatis-1.8 -C /tmp/man.conf foo =
 2>/dev/null; } done'
  0.057u 0.269s 0:00.32 96.8%     50+1551k 0+0io 120pf+0w
 
 So, yes, now the performance of -r1.8 are similar to the one of
 whatis.c -r1.5, thank you!
 
 I have also checked that the resulting man.db sizes are comparable
 and they are both 42MB.
 
 
 I think that whatis.c -r1.7 was accidentally reverted and case
 insensitive searchs no longer works, e.g.:
 
  % ./whatis-1.5 -C /tmp/man.conf.old ApRoPoS
  ApRoPoS: not found
  % ./whatis-1.7 -C /tmp/man.conf.old ApRoPoS
  apropos(1) - search the complete content of all man pages
  % ./whatis-1.8 -C /tmp/man.conf ApRoPoS
  ApRoPoS: not found
 
 Possible patch to reintroduce that:
 
  <https://www.NetBSD.org/~leot/src-patches/whatis-nocase.patch>
 
 If that's ok please let me know and I'll commit it (or feel free
 to commit it directly!).
 
 
 Apart that I think that also DBSCHEMA should be updated to document
 `name_desc' attribute of `mandb_links' table.
 


Home | Main Index | Thread Index | Old Index