Skip to content

Conversation

@efiop
Copy link
Contributor

@efiop efiop commented May 31, 2022

Was discovered as a part of treeverse/dvc#7824

@efiop efiop changed the title objects: don't recompute object size [WIP] objects: don't recompute object size May 31, 2022
@efiop efiop changed the title [WIP] objects: don't recompute object size objects: don't recompute object size May 31, 2022
@efiop efiop merged commit a183213 into treeverse:main May 31, 2022
@cached_property
def size(self) -> int: # pylint: disable=invalid-overridden-method
try:
return len(self.obj.read_raw())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welp, actually there is size, but just not for trees. Will send a followup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants