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

Performance Issue in GSelect component when searching #1628

Closed
joeyorlando opened this issue Mar 27, 2023 · 3 comments
Closed

Performance Issue in GSelect component when searching #1628

joeyorlando opened this issue Mar 27, 2023 · 3 comments
Assignees
Labels
bug Something isn't working involved:Frontend

Comments

@joeyorlando
Copy link
Contributor

joeyorlando commented Mar 27, 2023

See here for detailed explanation/reproduction steps.

In addition, we should remove these lines in the selectDropdownValue e2e tests helper function (was a temporary workaround for this issue and will no longer be needed once this is patched).

@joeyorlando joeyorlando added bug Something isn't working involved:Frontend labels Mar 27, 2023
joeyorlando added a commit that referenced this issue Mar 27, 2023
This PR cuts GitHub Action build times from 14-15 minutes, down to just
under 7 minutes. It does this by:
- caching `grafana-plugins/node_modules` and `pip` dependencies based on
their respective dependency files (eg. `requirements.txt` &
`yarn.lock`). This step alone saves ~3 minutes.
- get rid of the "build-engine-docker-image" and
"backend-integration-tests" jobs in the old "Integration Tests"
workflow. This was split out this way so that we could build the backend
docker image once, upload the artifact, and then reuse it across the
backend and e2e tests. We no longer need these backend integration tests
because we are testing the same thing in the e2e tests. This saves ~45
seconds of having to upload the image artifact.
- few improvements within the integration tests themselves:
- move plugin configuration to the `globalSetup.ts`. This means that
every test does not need to check if the plugin has been configured
because it is done once before all the tests are run.
- cache the plugin frontend build. If your commit doesn't change
anything to `grafana-plugin/src` or `grafana-plugin/yarn.lock` it should
be safe to reuse a previously built/cached version of the plugin
frontend. This saves ~3 minutes
- cache playwright binaries/dependencies. Only re-install them if the
version of `@playwright/test` in `grafana-plugin/yarn.lock` changes.
This saves ~3 minutes.
  
**Other things to mention**
Once we refactor the `GSelect` component to not call the `onChange`
callback on every keyDown event (#1628), this should allow us to
parallelize the integration tests, and cut the time required to execute
the tests themselves in half
@maskin25 maskin25 self-assigned this Jun 28, 2023
@maskin25
Copy link
Contributor

maskin25 commented Jul 6, 2023

@joeyorlando seems this link is broken

@joeyorlando
Copy link
Contributor Author

@maskin25 ah yes. Loom only let me keep a certain number of videos. I probably deleted that one. whoops.

I think overall it was just showing the network pane and each HTTP request on key-down.

github-merge-queue bot pushed a commit that referenced this issue Jul 11, 2023
# What this PR does

Fix performance Issue in GSelect component when searching

## Which issue(s) this PR fixes

#1628

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Joey Orlando <[email protected]>
Co-authored-by: Joey Orlando <[email protected]>
@joeyorlando
Copy link
Contributor Author

@maskin I believe this was deployed in #2466, closing this

brojd pushed a commit that referenced this issue Sep 18, 2024
This PR cuts GitHub Action build times from 14-15 minutes, down to just
under 7 minutes. It does this by:
- caching `grafana-plugins/node_modules` and `pip` dependencies based on
their respective dependency files (eg. `requirements.txt` &
`yarn.lock`). This step alone saves ~3 minutes.
- get rid of the "build-engine-docker-image" and
"backend-integration-tests" jobs in the old "Integration Tests"
workflow. This was split out this way so that we could build the backend
docker image once, upload the artifact, and then reuse it across the
backend and e2e tests. We no longer need these backend integration tests
because we are testing the same thing in the e2e tests. This saves ~45
seconds of having to upload the image artifact.
- few improvements within the integration tests themselves:
- move plugin configuration to the `globalSetup.ts`. This means that
every test does not need to check if the plugin has been configured
because it is done once before all the tests are run.
- cache the plugin frontend build. If your commit doesn't change
anything to `grafana-plugin/src` or `grafana-plugin/yarn.lock` it should
be safe to reuse a previously built/cached version of the plugin
frontend. This saves ~3 minutes
- cache playwright binaries/dependencies. Only re-install them if the
version of `@playwright/test` in `grafana-plugin/yarn.lock` changes.
This saves ~3 minutes.
  
**Other things to mention**
Once we refactor the `GSelect` component to not call the `onChange`
callback on every keyDown event (#1628), this should allow us to
parallelize the integration tests, and cut the time required to execute
the tests themselves in half
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working involved:Frontend
Projects
None yet
Development

No branches or pull requests

2 participants