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

Review J2N read-only collections performance #984

Open
1 task done
paulirwin opened this issue Oct 22, 2024 · 0 comments
Open
1 task done

Review J2N read-only collections performance #984

paulirwin opened this issue Oct 22, 2024 · 0 comments
Labels
good-first-issue Good for newcomers is:task A chore to be done up-for-grabs This issue is open to be worked on by anyone
Milestone

Comments

@paulirwin
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Task description

Split from #928:

Originally posted by @NightOwl888:

Each of the read only collections in J2N has a "Default" mode, which kicks in if the type being passed in is a J2N collection, where the rules of structural equality are defined. If it is a BCL or 3rd party collection, it will use "Aggressive" mode, which tries to patch the collection externally with the same behavior. But "Aggressive" mode is very costly in terms of performance.

... we should only use "Aggressive" mode if we are dealing with a user-supplied collection that we have no control over. However, if we have control over the concrete collection type that is used (or default), we should always ensure that a J2N collection is used for each of these calls so we don't downgrade to "Aggressive" mode. So, it would be a good idea to review to make sure we didn't swap to any BCL collections where it could matter.

Review usage of J2N read-only collections to ensure they use the Default mode.

@paulirwin paulirwin added up-for-grabs This issue is open to be worked on by anyone good-first-issue Good for newcomers is:task A chore to be done labels Oct 22, 2024
@paulirwin paulirwin added this to the 4.8.0 milestone Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Good for newcomers is:task A chore to be done up-for-grabs This issue is open to be worked on by anyone
Projects
None yet
Development

No branches or pull requests

1 participant