-
Notifications
You must be signed in to change notification settings - Fork 105
GCI1442 [Team TREE][2025] - Reduce memory footprint of dataclasses #409
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
base: main
Are you sure you want to change the base?
Conversation
MP-Aubay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update CHANGELOG.md
CHANGELOG.md
Outdated
|
|
||
| ### Added | ||
|
|
||
| - Added GCI-1442 - Python3.10 - Reduce memory footprint of dataclasses with slots |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add the URL of the PR with ID of the PR, like this example :
#333 Add JS variant of rule GCI505 - Idleness: Keep Screen On (addFlags)
| a: int | ||
| b: int | ||
| c: int | ||
| ---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, do you have any benchmarks demonstrating the memory or performance benefits of using slots=True ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... with CodeCarbon for example ...
| }, | ||
| "tags": [ | ||
| "memory", | ||
| "python", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please delete python tag.
no need python tag because if only for python, this rule only will be implemented inside python plugin.
|
This PR has been automatically marked as stale because it has no activity for 60 days. |
| a: int | ||
| b: int | ||
| c: int | ||
| ---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... with CodeCarbon for example ...
|
This PR has been automatically marked as stale because it has no activity for 60 days. |
General gist:
Since python 3.10 dataclass instances can easily enable a memory optimization.
Associated implementation:
green-code-initiative/creedengo-python#82
Reference:
green-code-initiative/creedengo-challenge#32