Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1815

Code generators line buffer output

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Patch Info:
      Patch Available

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gaul Andrew Gaul

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment