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

Optimize the ArchiveEntry class #94

Merged
merged 1 commit into from
Oct 20, 2019
Merged

Optimize the ArchiveEntry class #94

merged 1 commit into from
Oct 20, 2019

Conversation

Changaco
Copy link
Owner

@Changaco Changaco commented Oct 5, 2019

Defining __slots__ improves memory usage and speed.

@Changaco
Copy link
Owner Author

Changaco commented Oct 5, 2019

Not sure if I should add a __dict__ slot or not. Does anyone reading this comment attach custom attributes to the ArchiveEntry objects created by this library?

Edit: I decided not to add a __dict__ slot. We should support using a subclass of ArchiveEntry instead.

@Changaco Changaco merged commit eb546ab into master Oct 20, 2019
@Changaco Changaco deleted the slots branch October 20, 2019 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant