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

[v0.21.0]Refactor: Optimize GetCgroupPath() memory utilization #4083

Merged

Conversation

yanivagman
Copy link
Collaborator

1. Explain what the PR does

Refactor: Optimize GetCgroupPath() memory utilization

The GetCgroupPath function previously used recursion for directory traversal,
which could consume excessive memory for deep directory structures. This commit
refactors the function to use an iterative approach, reducing memory usage and
improving performance. Additionally, the comments and error handling in the
function have been updated for clarity and consistency.

2. Explain how to test it

3. Other comments

@yanivagman yanivagman changed the title Refactor: Optimize GetCgroupPath() memory utilization [v0.21.0]Refactor: Optimize GetCgroupPath() memory utilization May 29, 2024
The GetCgroupPath function previously used recursion for directory traversal,
which could consume excessive memory for deep directory structures. This commit
refactors the function to use an iterative approach, reducing memory usage and
improving performance. Additionally, the comments and error handling in the
function have been updated for clarity and consistency.
@yanivagman yanivagman force-pushed the improve_get_cgroup_path_mem_0.21 branch from faf0c2b to eacdbed Compare May 29, 2024 08:26
@yanivagman yanivagman merged commit 738bd99 into aquasecurity:v0.21.0 May 29, 2024
2 checks passed
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