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
The OrderedSet class, used in src/pdm/resolver/graph.py, stores data as a plain list. This means that __contains__ method runs in O(N) instead of O(1) like in regular sets. This can be quite inefficient if the set contains more than a few items.
Problem and Solution
The easiest is to store data as keys of a dict.
Additional Context
No response
Are you willing to contribute to the development of this feature?
Yes, I am willing to contribute to the development of this feature.
The text was updated successfully, but these errors were encountered:
Feature Description
The
OrderedSet
class, used in src/pdm/resolver/graph.py, stores data as a plain list. This means that__contains__
method runs in O(N) instead of O(1) like in regular sets. This can be quite inefficient if the set contains more than a few items.Problem and Solution
The easiest is to store data as keys of a dict.
Additional Context
No response
Are you willing to contribute to the development of this feature?
The text was updated successfully, but these errors were encountered: