[Opensrf-commits] r2002 - trunk/src/libopensrf (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Aug 14 16:48:13 EDT 2010
Author: scottmk
Date: 2010-08-14 16:48:08 -0400 (Sat, 14 Aug 2010)
New Revision: 2002
Modified:
trunk/src/libopensrf/osrf_prefork.c
Log:
Minor performance tweak: replace a call to buffer_add()
with a call to buffer_add_n().
In this case we already know how many characters to add,
so we can avoid a call to strlen().
M src/libopensrf/osrf_prefork.c
Modified: trunk/src/libopensrf/osrf_prefork.c
===================================================================
--- trunk/src/libopensrf/osrf_prefork.c 2010-08-14 11:33:08 UTC (rev 2001)
+++ trunk/src/libopensrf/osrf_prefork.c 2010-08-14 20:48:08 UTC (rev 2002)
@@ -966,7 +966,7 @@
set_fl( child->read_data_fd, O_NONBLOCK );
gotdata = 1;
}
- buffer_add( gbuf, buf );
+ buffer_add_n( gbuf, buf, n );
}
if( errno == EAGAIN )
More information about the opensrf-commits
mailing list