Skip to content

Add add_resource_attributes function #257

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

Closed
knoxsp opened this issue Mar 11, 2025 · 0 comments · Fixed by #258
Closed

Add add_resource_attributes function #257

knoxsp opened this issue Mar 11, 2025 · 0 comments · Fixed by #258
Assignees

Comments

@knoxsp
Copy link
Contributor

knoxsp commented Mar 11, 2025

There is currently a function called add_resource_attribute which is called repeatedly by the server in its add_resource_attributes function.
This functioin works well for a single call, but when called multipole thousands of times in a loop exposes massive inefficiency (~5000 resource attributes take > 90 seconds to add).

We should have a dedicated add_resource_attributes function which:

1: Assumes that all the RAs are being added to the same network
2: Identifies this network (by looking at any one of the RAs, extracting the node/link/group/network ID, and querying for the network ID if necesssary)
3: Extracts all the RAs in the network
4: Checks for overlaps and removes duplicates from the incoming RAs
5: Performs a bulk insert of RAs, rather than individual inserts.

@knoxsp knoxsp self-assigned this Mar 11, 2025
@knoxsp knoxsp linked a pull request Mar 11, 2025 that will close this issue
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 a pull request may close this issue.

1 participant