From e0521522cf3a43f99da13b4e1a59bd82bb470015 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Sat, 14 Jun 2008 03:19:16 +0000 Subject: don't always re-open the same CVS/Entries file, instead keep the last opened CVS/Entries around to operate on and close it whenever we switch directory. gives us a small performance boost, obviously. while doing this, switch the way we write revisions to disk by using fwrite(3) so stuff can get written to disk in chunks instead of writing everything line by line, another win. with help from otto@ ok tobias@ --- usr.bin/cvs/util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'usr.bin/cvs/util.c') diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c index 8b158889be0..3ad983df1c3 100644 --- a/usr.bin/cvs/util.c +++ b/usr.bin/cvs/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.145 2008/06/12 07:16:14 joris Exp $ */ +/* $OpenBSD: util.c,v 1.146 2008/06/14 03:19:15 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink @@ -654,7 +654,6 @@ cvs_mkpath(const char *path, char *tag) ent = cvs_ent_open(rpath); cvs_ent_add(ent, entry); - cvs_ent_close(ent, ENT_SYNC); xfree(entry); if (p != NULL) -- cgit v1.2.3