summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-09-04 01:12:39 +0000
committerJeremy Allison <jra@samba.org>2003-09-04 01:12:39 +0000
commit245fbf7efbc42530c81d5aac66681bb892c97557 (patch)
tree6e4a7e8bd5e5d66336e7f3689a62812322053103 /source3/smbd/process.c
parent7da5c6a0e719470e234ad6597ba33c9667786ab2 (diff)
downloadsamba-245fbf7efbc42530c81d5aac66681bb892c97557.tar.gz
samba-245fbf7efbc42530c81d5aac66681bb892c97557.tar.bz2
samba-245fbf7efbc42530c81d5aac66681bb892c97557.zip
Used cachegrind to track down some bottlenecks.
Removed calls to clobber_region when not compiling with developer as they were hiding speed problems. Added fast path to convert_string() when dealing with ascii -> ascii, ucs2-le to ascii and ascii to ucs2-le with values <= 0x7F. This gives a speedup of 22% on my nbench tests. Next I will do this on convert_string_allocate. Jeremy. (This used to be commit ef140d15ea0d76a3e7cdcadbfd3e917c210a9411)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 457ba8cc63..3c15cd1833 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1265,8 +1265,10 @@ void smbd_process(void)
if ((InBuffer == NULL) || (OutBuffer == NULL))
return;
+#if defined(DEVELOPER)
clobber_region(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, InBuffer, total_buffer_size);
clobber_region(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, OutBuffer, total_buffer_size);
+#endif
max_recv = MIN(lp_maxxmit(),BUFFER_SIZE);
@@ -1295,7 +1297,9 @@ void smbd_process(void)
num_smbs = 0; /* Reset smb counter. */
}
+#if defined(DEVELOPER)
clobber_region(SAFE_STRING_FUNCTION_NAME, SAFE_STRING_LINE, InBuffer, total_buffer_size);
+#endif
while (!receive_message_or_smb(InBuffer,BUFFER_SIZE+LARGE_WRITEX_HDR_SIZE,select_timeout)) {
if(!timeout_processing( deadtime, &select_timeout, &last_timeout_processing_time))