-
-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing performance of large YAML files #519
Comments
There's probably room for improvement. I would be interested in exploring this but I can't dedicate much time to performance right now because I already have another development in progress. I can probably provide some help if you guide this process, though. I've looked at
Looking at the |
Would you be able to provide an example of such a large YAML file ? |
|
Hello! |
Nice! I'll merge this change then. |
Small performance improvements. Addresses #519
Since there was a fix for this merged in, I'm going to close this issue. If you need more assistance, let me know. |
We're using YAML as a data format in our game, from data definitions to map files. We have a modestly sized map files now (that is at the time of writing, ~700 KiB uncompressed/38k lines).
I should note that we're not using deserialization features, JUST the AST (
YamlMappingNode
etc directly).The parsing performance is really starting the hurt (currently taking about 10% of debug server startup time just spent inside YamlDotNet parsing the main map file) and, the kicker, 90% of that time is spent inside various collection ops like
Array.Copy
,List.Insert
andList.RemoveAt
.Some profiling results
Could this be optimized? I tried saving the map files in flow style instead (since from my looking at the code the reason there's so many list butchering is because of parsing issues with block style?) but it did not seem to help perf. In fact it seems slightly worse with flow style.
The text was updated successfully, but these errors were encountered: