Skip to content

Conversation

@Nagha51
Copy link

@Nagha51 Nagha51 commented May 21, 2025

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

@MP-Aubay MP-Aubay changed the title Team TREE 2025 - GCI1442 | Reduce memory footprint of dataclasses GCI1442 [Team TREE][2025] - Reduce memory footprint of dataclasses May 21, 2025
@MP-Aubay MP-Aubay self-assigned this May 21, 2025
Copy link
Contributor

@MP-Aubay MP-Aubay left a 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

@Nagha51 Nagha51 requested a review from MP-Aubay May 21, 2025 13:26
CHANGELOG.md Outdated

### Added

- Added GCI-1442 - Python3.10 - Reduce memory footprint of dataclasses with slots
Copy link
Contributor

@MP-Aubay MP-Aubay May 21, 2025

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)

@Nagha51 Nagha51 requested a review from MP-Aubay May 21, 2025 13:56
a: int
b: int
c: int
----
Copy link
Contributor

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 ?

Copy link
Member

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",
Copy link
Member

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.

@github-actions
Copy link
Contributor

This PR has been automatically marked as stale because it has no activity for 60 days.
Please add a comment if you want to keep the issue open. Thank you for your contributions!

@github-actions github-actions bot added the stale label Aug 14, 2025
a: int
b: int
c: int
----
Copy link
Member

Choose a reason for hiding this comment

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

... with CodeCarbon for example ...

@github-actions github-actions bot removed the stale label Oct 12, 2025
@github-actions
Copy link
Contributor

This PR has been automatically marked as stale because it has no activity for 60 days.
Please add a comment if you want to keep the issue open. Thank you for your contributions!

@github-actions github-actions bot added the stale label Dec 11, 2025
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.

4 participants