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

fix: improve performance of network diagram #614

Merged

Conversation

bethesque
Copy link
Member

Cap the number of pacticipants that are included in the network diagram for performance and readability reasons

PACT-1070

Cap the number of pacticipants that are included in the network diagram for performance and readability reasons

PACT-1070
@bethesque bethesque requested review from vwong and Inksprout June 9, 2023 03:29
@bethesque
Copy link
Member Author

bethesque commented Jun 9, 2023

Goodbye to some of least scalable code I have ever written 😆

Copy link
Contributor

@vwong vwong left a comment

Choose a reason for hiding this comment

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

LGTM

@bethesque
Copy link
Member Author

For future reference, the way the "group" is loaded now is to start with the pacticipant in the "center", find all integrations that involve that pacticipant, identify the newly "found" pacticipants, then find all their integrations, and loop until we aren't finding any more new pacticipants (ie. we've found the end of the group). This means the number of queries required to identify the group scales linearly with the maximum number of hops between the initial pacticipant and the furthest pacticipant in the group, which performs acceptably well in my tests. We now also cap the number of pacticipants we return in the group, because the graph in the UI breaks once it hits around 200 pacticipants, so there's no point going any further.

@bethesque bethesque merged commit ffd3ec4 into master Jun 12, 2023
@bethesque bethesque deleted the feat/PACT-1070-dashboard-performance-network-diagram branch June 12, 2023 23:29
bethesque added a commit that referenced this pull request Mar 22, 2024
* fix: improve performance of network diagram

Also cap the number of pacticipants that are included in the network diagram for performance and readability reasons

PACT-1070
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