soapcpp2: skip fflush calls in release builds?
Development toolkit for Web Services and XML data bindings for C & C++
Brought to you by:
engelen
Again looking at Visual Studio performance profiling, soapcpp2 is spending fflush caught my eye. Looking at the sources, the only reason I could find for the 90-something fflush() calls was a desire to inspect the output while debugging the code or something like that. Wrapping them up in a macro and making a noop when DEBUG isn't defined, I found a 2-3% runtime reduction on Windows.
Cheers,
knut.
The
fflushcalls are helping me to find errors and code generation timing issues (e.g. usingtail -f, even when DEBUG is not defined. They are executed only after a block of source code is generated. I'd rather keep it this way so I can still usetail -f.