Fix editor profiler script function sort order #87661
Merged
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.
In 4.2.1 stable, and at HEAD, a busy frame in a gdscript-only game may show next to no time in Script Functions (note 70ms in Process, 0.00ms in Scripts):
However, looking at a similar frame with the CLI
--profiling
flag shows much more useful output:After this PR, we see the more expensive functions in the editor list as well:
The engine internally limits the number of functions reported back (to 16 by default). To this point, it's been sort the profiling info in ascending order of time spent, then trimming the list. This meant we may only see the best (fastest) functions, instead of the worst, which you probably want when profiling.
Now the servers sort more closely matches the local_debugger, which worked fine.
Cleans up #25328