vdash
vdash copied to clipboard
Speed up log line parsing
The source capture group was trying to match beyond the closing square bracket ]
. Limiting the search to the first square bracket saves a fair bit of work
The flamegraphs aren't rendering ideally on Github, but very rough numbers from a test against a single 300MB log file on an M1 Mac Pro:
Around 64% of samples were taken in the decode_metadata
function before the change.
Around 45% of samples were taken in the decode_metadata
function after the change.
Pre change flamegraph:
Post change flamegraph: