- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
Mark UrlDecodeInternal noinline to work around inliner limitation #118599
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
Conversation
If this method is inlined, the JIT may be unable to inline some of its callees, leading to a perf regression. See dotnet#114996.
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.
Pull Request Overview
This PR addresses a JIT compiler inlining limitation by marking two UrlDecodeInternal methods with [MethodImpl(MethodImplOptions.NoInlining)] to prevent performance regressions. The issue occurs when these methods are inlined, causing the JIT to fail to inline their important callees.
Key changes:
- Added NoInliningattribute to bothUrlDecodeInternalmethod overloads
- Added explanatory comments describing the JIT workaround
        
          
                src/libraries/System.Private.CoreLib/src/System/Net/WebUtility.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/libraries/System.Private.CoreLib/src/System/Net/WebUtility.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | In particular #114996 (comment) @jeffhandley @tannergooding PTAL | 
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
| @EgorBot --arm --intel --filter  | 
| Egorbot not seeing any improvement here... back to the drawing board. | 
| Handling this via budget increase instead: #118641 | 
If this method is inlined, the JIT may be unable to inline some of its callees, leading to a perf regression.
See #114996.