Skip to content

Commit

Permalink
obj: add __slots__
Browse files Browse the repository at this point in the history
We are creating lots of these, so it will help to save up on memory and
improve performance.

Similar to iterative/dvc-data#56
  • Loading branch information
efiop committed Jun 20, 2022
1 parent c7d7b4b commit e99703b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dvc_objects/obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@


class Object:
__slots__ = ("path", "fs", "oid")

def __init__(
self,
path: "AnyFSPath",
Expand Down

0 comments on commit e99703b

Please sign in to comment.