Skip to content
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

perf: batcher no-dict lookup for (Un)Reliable #3382

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

imerr
Copy link
Contributor

@imerr imerr commented Feb 14, 2023

Dict lookup uses 6% in an il2cpp build for 121 nts, this ugly patch brings that down to 0.x%

I don't like this from a code perspective, so lets talk if there's a better way

Do people actually use channel ids that are big? We could do an array lookup instead with the channelId as index if they dont
Or looping over a list to find the channel by id should be faster than using a Dict for 2 (or a handful) of values
Allowing more than the 2 default channels might be useful for some people, so I wouldnt advocate removing them outright

Bleh.

Dict lookup uses 6% in an il2cpp build for 121 nts, this ugly patch brings that down to 0.x%
@imerr
Copy link
Contributor Author

imerr commented Feb 14, 2023

Profiler screenshots:
image
vs
image

@MrGadget1024 MrGadget1024 added the work in progress Need more time to decide. Nothing to do here for now. label Feb 15, 2023
@imerr imerr marked this pull request as ready for review February 16, 2023 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress Need more time to decide. Nothing to do here for now.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants