Only copy sharename up from rap_to_pjobid
commit4a35c974e97551b1ccbfa41d4c08f0598e3c26aa
authorVolker Lendecke <vl@samba.org>
Sun, 1 Mar 2009 10:39:44 +0000 (1 11:39 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 1 Mar 2009 11:27:55 +0000 (1 12:27 +0100)
tree0b4be816a1cfef54cada3a5c0d4530f9960ddbf1
parent79fc0ddaf44af1e31d7e6f2c6f576fd3c05e087d
Only copy sharename up from rap_to_pjobid

Why?? :-)

Another one of the little micro-optimizations that I just came across: If you
allocate a variable in a sub-block like the "fstring sharename" in
write_file(), gcc even with -O3 will allocate this variable unconditionally on
the stack at the beginning of the routine. So with eliminating this fstring we
cut 256 bytes of stack in a very hot code path writing to a file. It might make
us a bit more cache-friendly.

This would probably not be worth a second look if it involved larger code
changes, but this one was just too simple to let it pass :-)
source3/printing/printfsp.c
source3/printing/printing.c
source3/smbd/fileio.c