Bankim Bhavsar has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/17418 )

Change subject: [flags] Remove the costly stringstream to string conversion in 
a loop
......................................................................

[flags] Remove the costly stringstream to string conversion in a loop

stringstream.str() returns a copy of the underlying string
buffer which is expensive if done repeatedly in a loop.
This change avoids the check for emptiness of the stringstream
in a loop and simply appends the newline character at the
end of every flag. This means there'll be a newline at
the end of the string which is okay.

Change-Id: I6f85aa85feaac34abfa8a582f936392d0a4b0ad6
Reviewed-on: http://gerrit.cloudera.org:8080/17418
Reviewed-by: Alexey Serbin <[email protected]>
Tested-by: Kudu Jenkins
---
M src/kudu/util/flags.cc
1 file changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved
  Kudu Jenkins: Verified

--
To view, visit http://gerrit.cloudera.org:8080/17418
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6f85aa85feaac34abfa8a582f936392d0a4b0ad6
Gerrit-Change-Number: 17418
Gerrit-PatchSet: 2
Gerrit-Owner: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Bankim Bhavsar <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)

Reply via email to