-
Notifications
You must be signed in to change notification settings - Fork 461
perf: [Port] Backport of PR-3227 #3827
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
Open
michalChrobot
wants to merge
6
commits into
develop-2.0.0
Choose a base branch
from
backport-3227
base: develop-2.0.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+61
−24
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User submitted PR: #3224 ## Measurement With `minimalproject`, I used the following code for measurement. ```diff diff --git a/com.unity.netcode.gameobjects/Editor/CodeGen/NetworkBehaviourILPP.cs b/com.unity.netcode.gameobjects/Editor/CodeGen/NetworkBehaviourILPP.cs index 7e95fea..39b4f991 100644 --- a/com.unity.netcode.gameobjects/Editor/CodeGen/NetworkBehaviourILPP.cs +++ b/com.unity.netcode.gameobjects/Editor/CodeGen/NetworkBehaviourILPP.cs @@ -77,6 +77,8 @@ namespace Unity.Netcode.Editor.CodeGen m_Diagnostics.Clear(); + var sw = System.Diagnostics.Stopwatch.StartNew(); + // read var assemblyDefinition = CodeGenHelpers.AssemblyDefinitionFor(compiledAssembly, out m_AssemblyResolver); if (assemblyDefinition == null) @@ -171,6 +173,8 @@ namespace Unity.Netcode.Editor.CodeGen assemblyDefinition.Write(pe, writerParameters); + m_Diagnostics.AddWarning($"ILPP has completed for {compiledAssembly.Name} in {sw.ElapsedMilliseconds} ms"); + return new ILPostProcessResult(new InMemoryAssembly(pe.ToArray(), pdb.ToArray()), m_Diagnostics); } ``` ### Before ``` (0,0): warning - ILPP has completed for Unity.Netcode.Editor in 531 ms (0,0): warning - ILPP has completed for Unity.Netcode.EditorTests in 604 ms (0,0): warning - ILPP has completed for Unity.Netcode.Components in 363 ms (0,0): warning - ILPP has completed for Unity.Netcode.TestHelpers.Runtime in 330 ms (0,0): warning - ILPP has completed for Unity.Netcode.RuntimeTests in 735 ms ``` ### After ``` (0,0): warning - ILPP has completed for Unity.Netcode.Editor in 79 ms (0,0): warning - ILPP has completed for Unity.Netcode.EditorTests in 128 ms (0,0): warning - ILPP has completed for Unity.Netcode.Components in 146 ms (0,0): warning - ILPP has completed for Unity.Netcode.TestHelpers.Runtime in 117 ms (0,0): warning - ILPP has completed for Unity.Netcode.RuntimeTests in 537 ms ``` ## Changelog - Changed: Improved performance of NetworkBehaviour ILPostProcessor by omitting unnecessary type and assembly resolutions. ## Testing and Documentation - No tests have been added. - No documentation changes or additions were necessary. --------- Co-authored-by: ruccho <noboroo2000@yahoo.co.jp>
NoelStephensUnity
approved these changes
Jan 22, 2026
Member
NoelStephensUnity
left a comment
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.
Looks good to me.
👍
Thank you for doing this!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
As noted in #3808 it seems like we missed forward porting of PR-3227 from
develop(NGOv1.X) todevelop-2.0.0(NGOv2.X) branch. This PR does the portNote that there were no conflicts when cherry-picking the PR but still would be worth double checking.
Also I noticed that with the original PR the changelog description was also missed, something that can be clarified
Jira ticket
N/A
Changelog
Documentation
Testing & QA (How your changes can be verified during release Playtest)
We should do the same check as was done in the original PR (TBD)
Backports
This is a port of #3227