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

Refactor analytic view functions to use less memory #2270

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Quasar985
Copy link
Collaborator

Prerequisites

  • Reviewed the checklist

  • Reviewed feedback from the "Sonar Cloud" bot. Note that you have to wait
    for the "CI / Unit Tests") to complete first. Failed Unit tests can be
    debugged by adding the label "verbose logging" to the GitHub PR.

Description of the Change

Refactored some of the functions used in different algorithms in the Analytic View to avoid Out of Memory errors. Currently, the only change is avoiding declaring BitSet variables when they aren't needed. The size of these BitSet variables were directly proportional to the number of nodes on a graph, and the number of these variables created is also directly proportional to the number of nodes. Now, they are only created when needed.

Alternate Designs

A more in-depth rework of each of these functions could be done to be more efficient.

Why Should This Be In Core?

N/A

Benefits

Lowered the memory use of centrality algorithms. These were unusable for graphs with many nodes.

Possible Drawbacks

None.

Verification Process

Applicable Issues

#2199

@Quasar985 Quasar985 self-assigned this Feb 25, 2025
@Quasar985 Quasar985 changed the title Refactor some variable declaration to not use memory for no purprose Refactor analytic view functions to use less memory Mar 2, 2025
Copy link

sonarqubecloud bot commented Mar 4, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
3.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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