Menu

#182 soapcpp2: skip fflush calls in release builds?

Patch
closed-rejected
None
5
2020-03-11
2020-03-08
No

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.

1 Attachments

Discussion

  • Robert van Engelen

    The fflush calls are helping me to find errors and code generation timing issues (e.g. using tail -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 use tail -f.

     
  • Robert van Engelen

    • status: open --> pending
     
  • Robert van Engelen

    • status: pending --> closed-rejected
     

Log in to post a comment.

MongoDB Logo MongoDB