Opened 7 years ago
Closed 7 years ago
#11288 closed Bugs (fixed)
Redundant std::string allocations in filesystem error handling code
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.57.0 | Severity: | Optimization |
Keywords: | Cc: |
Description
During performance profiling of our product it was identified that many std::strings allocations are coming from filesystem error handling code.
The error handling code dynamically allocates std::string instances to store error messages, however when non-throwing API is used the strings are just redundant. Unnecessary allocations can be easily avoided by passing in const char*.
Please find the patch attached.
Attachments (1)
Change History (2)
by , 7 years ago
Attachment: | operations.cpp.patch added |
---|
comment:1 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch pushed to develop branch.
Will merge to master once enough regression tests have cycled.
Thanks,
--Beman
Note:
See TracTickets
for help on using tickets.
A patch to avoid redundant string allocations