-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Optimize XmlTextEncoder.Write #61773
Optimize XmlTextEncoder.Write #61773
Conversation
Tagging subscribers to this area: @dotnet/area-system-xml Issue Detailsnull
|
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextEncoder.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextEncoder.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextEncoder.cs
Outdated
Show resolved
Hide resolved
@eiriktsarpalis done |
src/libraries/System.Private.Xml/src/System/Xml/Core/XmlTextEncoder.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Hi @kronic -- thanks for this and all of your other recent contributions. As you know, XML is an area our team has not invested in for several years; your work all has the spirit of modernizing the code a bit, and presumably improving performance. There are a few things that would help us greatly with reviewing your PRs:
If you could summarize all of this as a new issue, that would be best for us. The title could capture the motivation, and the description could include a task list that includes all of the changes you've already submitted PRs for, as well as any other changes you're planning to make. The description could also describe the scenarios where these optimizations are proving valuable to you. Before we proceed with merging more PRs, I'd like for us to review this information holistically. That will allow us to better calculate the risk/reward involved. For the time being, I'm going to mark this and your other open PRs as "needs more info" and I'll link the other PRs to this comment. Thanks again for your efforts! |
There are still large "legacy" codebases that make use of xml and improving perf for them in a community contribution seems like a reasonable thing to do since it isn't a customer focus issue from the MS side. As you've noted Xml hasn't really seen any sustained effort because it's not the web development flavour of the decade anymore. In the specific case of #61774 which improves performance by using a stackalloc avoiding an allocation there should be no observable change unless you're using a profiler. That would fit into the reasoning of making the function better. Why would this need further explanation? Are community contributions in unpopular areas not welcome? |
The contributions are certainly welcomed; we're grateful for them for sure! And while the majority of the effort is certainly on the contributor's (@kronic's) end, it's still nonzero for the team too--reviewing, testing, and accruing even minor risks to regressions add up in aggregate. Thus, for our own planning purposes, we need to gauge how much effort is worthwhile. That's where having the context and motivations (ideally in measurable forms) will help us out. We can assess how far into these contributions we are and how much more is coming; that allows us to budget time for the reviews, testing, etc. appropriately. Getting the context I requested will help us avoid the situation of community contributions continuing to roll in while we fall behind reviewing them, and the PRs ultimately lose momentum, go stale, start having merge conflicts, and time is wasted. The better we can all have our expectations set, the less likely that outcome is. |
@jeffhandley
How many pr are you willing to accept per month? |
I don't think this is an issue of volume of concurrently open PRs. This is more about defining a mission statement so we can better understand the motivation and risk-to-benefit ratio. Making the codebase "more readable" or "more modern" does not meet the bar in its own right. And any claims to improving performance should be backed by benchmarks demonstrating significant improvement in common scenaria (and does not regress other scenaria). I wouldn't want to discourage small community PRs that make small improvements. However layering a large number of small PRs would make it difficult for us to diagnose any potential regressions that get picked up when we ship .NET 7. Going forward I would recommend taking the following steps:
|
@kronic I'll merge this as is because this change is fairly isolated and it does simple improvement. Since there have been some concerns on the volume of the PRs please create an uber issue (i.e. |
No description provided.