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

feat(heureka): optimizes performance - separates total count and page info from main data #450

Merged
merged 12 commits into from
Sep 25, 2024

Conversation

hodanoori
Copy link
Contributor

@hodanoori hodanoori commented Sep 24, 2024

Summary

Optimized the data fetching for main views in Heureka to improve performance with large datasets (millions of issues). This change splits the fetch requests for all three views (IssueMatches, Services, and Components) by separating the total count and page info queries from the main data queries.

Changes Made

  • Split the GraphQL queries for each view (IssueMatches, Services, Components) to separate fetching of total count and page info from the main data.
  • Updated the shared ListController to send two requests per view: one for fetching the main data quickly, and another for fetching total count and page info, which takes longer.
  • Set up queryFn for both main and count requests in useQueryClientFn to handle each query independently.
  • Added CCRN to the IssueMatches list view.
  • Added issue description to the issue details panel.

Some small fixes:

  • Automatically close the details panel when switching between different views.

Related Issues

Screenshots (if applicable)

Testing Instructions

  1. npm i
  2. npm run TASK

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.

@hodanoori hodanoori requested a review from a team as a code owner September 24, 2024 15:02
Copy link

changeset-bot bot commented Sep 24, 2024

🦋 Changeset detected

Latest commit: 44a26c1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@cloudoperators/juno-app-heureka Minor
@cloudoperators/juno-app-greenhouse Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Sep 24, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-09-25 13:21 UTC

@hodanoori hodanoori changed the title feat(heureka): separates total count and page info from main data feat(heureka): optimizes performance - separates total count and page info from main data Sep 25, 2024
Copy link
Contributor

@barsukov barsukov left a comment

Choose a reason for hiding this comment

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

Little comment from my side

@andypf
Copy link
Collaborator

andypf commented Sep 25, 2024

I try to search by regular expression, but it seems not to work.

@hodanoori
Copy link
Contributor Author

I try to search by regular expression, but it seems not to work.

The search in the Heureka API is based on wildcard search, which is simpler but more limited than regular expressions. Therefore, I believe it does not fully support regular expression syntax.

@andypf
Copy link
Collaborator

andypf commented Sep 25, 2024

I try to search by regular expression, but it seems not to work.

The search in the Heureka API is based on wildcard search, which is simpler but more limited than regular expressions. Therefore, I believe it does not fully support regular expression syntax.

ok, but the placeholder is "Search term or regular expression" :)
Maybe it make sense to change the placeholder to
Services -> "Search by service"
IssueMatchers -> "Search by primary name"
Components -> "Search by name"

ArtieReus
ArtieReus previously approved these changes Sep 25, 2024
Copy link
Collaborator

@ArtieReus ArtieReus left a comment

Choose a reason for hiding this comment

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

lgtm

@andypf andypf enabled auto-merge (squash) September 25, 2024 11:49
@andypf andypf merged commit 139621e into main Sep 25, 2024
15 checks passed
@andypf andypf deleted the heureka-split-fetch-requests branch September 25, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants