Chromium Code Reviews
DescriptionCalling [NSMutableData increaseLengthBy:bytes_read] increases the
NSMutableData length and fills the newly allocated memory with zeros.
According to profiling, filling with zeros may take approximately 1.4%
of the total network thread CPU utilization. Instead of growing
the buffer, call [NSMutableData appendBytes...], which grows the buffer
and copies the data in one step. Unfortunately, there are no performance
benefits in doing so, because the underlying implementation uses
memmove(), which is less efficient than memcpy(); however, the change
simplifies the code.
BUG=724546
Review-Url: https://codereview.chromium.org/2939993002
Cr-Commit-Position: refs/heads/master@{#480455}
Committed: https://chromium.googlesource.com/chromium/src/+/f471163c1112a5ed7685ac2d1f911c922cb08aa0
Patch Set 1 #
Messages
Total messages: 13 (6 generated)
|
|||||||||||||||||||