Fix performance issue in MLB 2k games with profiler funcs #17666
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.
The function
sceKernelReferGlobalProfiler
are spammed by this game between matches. So let's reduce logging to DEBUG and delay the response by a tested number of ms. And do the same for its sibling function, sceKernelReferThreadProfiler.Fixes #17623
Here's the pspautotest I wrote, though not a good idea to check in the timing checks:
and the output:
It should be noted though that this doesn't really confirm that the functions don't take a parameter, only that they return 0. But I've chosen to just follow https://pspdev.github.io/pspsdk/group__ThreadMan.html#ga8fd30da51b9dc0507ac4dae04a7e4a17 . It does seem assymetrical with
sceKernelReferSystemStatus
though...