You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@NightOwl888 I'm reviewing the J2N read-only collections code to make sure I understand, and I'm not sure how this is true: "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."
This does not seem to be dependent on the collection being a J2N collection. It appears as if passing i.e. a System.Collections.Generic.List<string> would meet that criteria for Default. Let me know if I'm missing something. Thanks!
Is there an existing issue for this?
Task description
Split from #928:
Originally posted by @NightOwl888:
Review usage of J2N read-only collections to ensure they use the Default mode.
The text was updated successfully, but these errors were encountered: