]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove O_SYNC from the options passed to dbmopen().
authorse <se@FreeBSD.org>
Fri, 19 Feb 2016 08:42:13 +0000 (08:42 +0000)
committerse <se@FreeBSD.org>
Fri, 19 Feb 2016 08:42:13 +0000 (08:42 +0000)
commit2f3384530caf42a4c2bc7069ddf8dcd9ae64ffcc
tree8a903f27530f7592b01170a1f1f332cb6093b111
parent877b2a020a9b9c54ed1fa37669ffa8e387b8f1e8
Remove O_SYNC from the options passed to dbmopen().

The output file is created as a temporary file that is moved over the
existing file after completion. Thus there is no need to immediately
flush all created db records to the temporary file.

This speeds up creation of the termcap db by a factor of 40 on my
ZFS based /etc filesytem (from 25 seconds to 0.6 seconds).

I have compared multiple output files created with and without O_SYNC
and they came out identical each time.  Nonetheless it might be best
to MFC this change and the similar one for services_mkdb (r295465) at
the same time when the changes to hash.c in review D5186 are merged.

MFC:  1 week
usr.bin/cap_mkdb/cap_mkdb.c