opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
783 stars 316 forks source link

Make std::regex parsing have a static lifetime #3667

Closed adamkewley closed 8 months ago

adamkewley commented 8 months ago

Fixes issue N/A

Minor nit I spotted when I am running applications that load many osim files (e.g. OSC's test suite) - the profiler notices that it's spending a large amount of time (5 % or so) compiling regex strings on the lines that are changed by this diff. This speedup only really affects initially loading older osim files (e.g. many of the example files in OpenSim/OSC).

Brief summary of changes

Testing I've completed

Looking for feedback on...

CHANGELOG.md (choose one)


This change is Reviewable