Skip to content

perf: Prioritize non-weak streams over weak referenced streams. - #304

Merged
TwoTenPvP merged 1 commit into
Unity-Technologies:masterfrom
GarethPikPok:patch-1
Feb 3, 2020
Merged

perf: Prioritize non-weak streams over weak referenced streams.#304
TwoTenPvP merged 1 commit into
Unity-Technologies:masterfrom
GarethPikPok:patch-1

Conversation

@GarethPikPok

Copy link
Copy Markdown
Contributor

If we prioritize pulling from the overflow streams (as it was before), it's possible for us to retain the weak references for a lot longer than is desirable as we will keep accessing them. It's therefore preferable to return a stream from the normal queue to allow the GC time to clean the weak references, and only return an overflow value if there is no other option.

If we prioritize pulling from the overflow streams (as it was before), it's possible for us to retain the weak references for a lot longer than is desirable as we will keep accessing them. It's therefore preferable to return a stream from the normal queue to allow the GC time to clean the weak references, and only return an overflow value if there is no other option.
@TwoTenPvP TwoTenPvP changed the title Prioritize non-weak streams over weak referenced streams. perf: Prioritize non-weak streams over weak referenced streams. Feb 3, 2020
@TwoTenPvP
TwoTenPvP merged commit 28e1436 into Unity-Technologies:master Feb 3, 2020
@MidLevel-Bot

Copy link
Copy Markdown

This pull request is included in version 11.10.1

The release is available to download on GitHub release or in the MLAPI Installer.

MrCool92 pushed a commit to MrCool92/MLAPI that referenced this pull request Dec 6, 2020
…y-Technologies#304)

If we prioritize pulling from the overflow streams (as it was before), it's possible for us to retain the weak references for a lot longer than is desirable as we will keep accessing them. It's therefore preferable to return a stream from the normal queue to allow the GC time to clean the weak references, and only return an overflow value if there is no other option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants