-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
IncludeXmlComments performance issues #2164
Comments
If you have ideas around improving the performance of this particular feature, I would suggest submitting a PR for it. If you think the changes are going to be significant, I would start with a 1 pager refactor proposal so we can align on the changes before you make them. |
Yeah thats a rather significant change. Just take a note that the current implementation is O(N^2) and it could be O(N) parse and O(1) lookup |
@domaindrivendev I've raised a PR for it (#2443), please review when you get a chance- thanks! |
@stevendarby at a glance your PR approach makes sense to me. I’ll try do a full review and either merge or provide feedback later today. |
@domaindrivendev still hoping for a review if you get a chance - thanks! |
Hi @domaindrivendev, just checking in once more- I'm keen to hear from you regarding the PR, if you have any feedback and/or if it's likely to get merged any time soon. Thanks |
The changes in #2839 might also contribute to improving this. |
Version 6.1.4 on .NET 5
We were using the following code to include multiple XMLs for comments (model dlls, app parts etc).
This was working for years until a dev referenced an external commercial library with it's own XML comment file (130k lines / 7 MB) and the generation time for the swagger.json went from ~600ms to 40s+ for each request.
Of course filtering out this file fixed the issue, however I don't think performance degradation should be that bad for a mere 130k lines of additional xml and even if it takes 40s why the swagger.json is it taking so long for subsequent requests.
I havn't looked at your code, yet it feels like you're not using a dictionary lookup and just search the xml nodes over and over again and the end result is not cached at all.
Update:
eww xpath.. that explains it
The text was updated successfully, but these errors were encountered: