Bankim Bhavsar has uploaded this change for review. ( 
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
---
M src/kudu/util/flags.cc
1 file changed, 1 insertion(+), 4 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/18/17418/1
--
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: newchange
Gerrit-Change-Id: I6f85aa85feaac34abfa8a582f936392d0a4b0ad6
Gerrit-Change-Number: 17418
Gerrit-PatchSet: 1
Gerrit-Owner: Bankim Bhavsar <[email protected]>

Reply via email to