[ 
https://issues.apache.org/jira/browse/THRIFT-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13541609#comment-13541609
 ] 

Jens Geyer commented on THRIFT-1815:
------------------------------------

I see and understand your point, but I'm not so sure about cost vs. benefit 
with regard to the Thrift compiler itself. I have two major questions, maybe 
you could shed some light on them:

(1) How much is the performance impact that you experience when compiling a 
single thrift file? How many thrift files are you compiling on a regular basis 
and therefore what's the total performance impact?

(2) How likely is it, that someone breaks your changes with another patch, 
which e.g. might reintroduce "using Namespace std" again? Could this be 
prevented somehow?


                
> Code generators line buffer output
> ----------------------------------
>
>                 Key: THRIFT-1815
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1815
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (General)
>    Affects Versions: 0.9
>            Reporter: Andrew Gaul
>              Labels: performance
>         Attachments: thrift_std_endl.patch
>
>
> This results in slow performance on FUSE- and network-based filesystems, 
> e.g., eCryptfs.  std::ostream << std::endl emits a newline and flushes 
> buffers to the kernel[1], yielding excessive system calls.  Instead, emit 
> "\n" which does the equivalent without the flush[2].  The attached patch 
> accomplishes this while minimizing code churn by removing "using namespace 
> std" and introducing a static variable endl.
> [1] http://www.cplusplus.com/reference/ios/endl/
> [2] 
> http://stackoverflow.com/questions/5492380/what-is-the-c-iostream-endl-fiasco

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to