Skip to content

Conversation

@lahma
Copy link
Contributor

@lahma lahma commented Jun 2, 2024

Improving scalar loading performance a bit as it's done a lot for common files. Check for "null" marker faster and don't do try-catch in a loop. I fixed the saltern example YAML file for easier testing.

The OrderedDictionary change looks large, but it seems that it has been stored in Git with wrong newlines and always pops up as modified otherwise. If you check ignore whitespace in PR view that should help.

YamlDotNet.Benchmark.YamlStreamBenchmark

Diff Method Toolchain Mean Error
Old LoadLarge Default 61.27 ms 0.538 ms
New Default 55.86 ms (-9%) 0.891 ms

@lahma lahma force-pushed the optimize-scalar-load branch from b83c800 to 754d5c5 Compare June 2, 2024 09:13
* check for "null" marker faster
* don't do try-catch in a loop
@lahma lahma force-pushed the optimize-scalar-load branch from 754d5c5 to 7964734 Compare June 2, 2024 09:50
@EdwardCooke EdwardCooke merged commit 760472f into aaubry:master Jul 14, 2024
@lahma lahma deleted the optimize-scalar-load branch July 14, 2024 13:39
@aaubry
Copy link
Owner

aaubry commented Jul 14, 2024

This feature has been released in version 16.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants