Opened 7 years ago

Closed 7 years ago

#11288 closed Bugs (fixed)

Redundant std::string allocations in filesystem error handling code

Reported by: yevhen.ivannikov@… 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)

operations.cpp.patch (1.4 KB ) - added by anonymous 7 years ago.
A patch to avoid redundant string allocations

Download all attachments as: .zip

Change History (2)

by anonymous, 7 years ago

Attachment: operations.cpp.patch added

A patch to avoid redundant string allocations

comment:1 by Beman Dawes, 7 years ago

Resolution: fixed
Status: newclosed

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.