Fix performance issues with folly::Uri::authority().
authorStephane Sezer <sas@fb.com>
Wed, 25 Sep 2013 17:50:46 +0000 (10:50 -0700)
committerPeter Griess <pgriess@fb.com>
Tue, 15 Oct 2013 01:43:30 +0000 (18:43 -0700)
commit2c3828bc4ea09ee0ebe104114df3dcb07ce3cbae
tree11b47f2ae900081c47700295e83ccba268d9f0c3
parentcca262b3a51a2a49749c3a0afd303f7a54b0837d
Fix performance issues with folly::Uri::authority().

Summary: String concatenation was not performed correctly in folly::Uri::authority(). This commit fixes the issue by pre-allocating enough space and buliding the string left to right.

Test Plan: Unit tests in folly/test.

Reviewed By: tudorb@fb.com

FB internal diff: D981069
folly/Uri.cpp
folly/test/UriTest.cpp