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

[BCE-31829] - Fix high CPU issue #111

Merged
merged 1 commit into from
Apr 14, 2024
Merged

[BCE-31829] - Fix high CPU issue #111

merged 1 commit into from
Apr 14, 2024

Conversation

AdamDev
Copy link
Contributor

@AdamDev AdamDev commented Apr 12, 2024

The plugin results in high CPU usage without even invoking a scan.
The underlying issue originates from the SeverityFilterButton component, where the state changes occur inside the rendering function.
This state modification causes the rendering function to be executed repeatedly, leading to an infinite loop.
The resolution involves avoiding any modifications to the state during the rendering process.

CPU Before: 150
CPU After: 10

@AdamDev AdamDev changed the title [BCE-31829] - fix high CPU issue [BCE-31829] - Fix high CPU issue Apr 12, 2024
Copy link
Contributor

@anatolii-paloaltonetworks anatolii-paloaltonetworks left a comment

Choose a reason for hiding this comment

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

looks good

@AdamDev AdamDev merged commit 7ed1832 into main Apr 14, 2024
8 checks passed
@AdamDev AdamDev deleted the fix_high_cpu_bug branch April 14, 2024 05:56
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.

3 participants