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

[Visualize] Client Side caching #105589

Merged
merged 4 commits into from Jul 19, 2021
Merged

[Visualize] Client Side caching #105589

merged 4 commits into from Jul 19, 2021

Conversation

alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Jul 14, 2021

Closes: #102622

Summary

Describe the feature:
We could do some optimizations in order for our visualizations to cache the data in the browser and only fetch them when is necessary. Even if I change something that affects the chart and not the data (for example change the palette), a search request runs again.

We could use the session id in order to cache our search requests and only trigger them when is necessary.
Moreover, we could improve our performance if the searchSessionId from the dashboard is shared to the visualization that is edited. In that case, there is no need to re-fetch the data, as they were already fetched on the Dashboard.

@alexwizp alexwizp self-assigned this Jul 14, 2021
@alexwizp alexwizp added v7.15.0 v8.0.0 Feature:Visualizations Generic visualization features (in case no more specific feature label is available) Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes labels Jul 14, 2021
@alexwizp alexwizp marked this pull request as ready for review July 15, 2021 08:16
@alexwizp alexwizp requested a review from a team July 15, 2021 08:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@stratoula stratoula added release_note:feature Makes this part of the condensed release notes and removed release_note:skip Skip the PR/issue when compiling release notes labels Jul 15, 2021
@stratoula
Copy link
Contributor

@alexwizp I am changing the label to feature. I think it is important to mention it on our documentation

@stratoula stratoula added this to In progress in Legacy visualizations via automation Jul 15, 2021
@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp alexwizp marked this pull request as draft July 15, 2021 20:21
@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula stratoula marked this pull request as ready for review July 19, 2021 08:30
Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

It works fine Alex, thank you a ton!
In case of green CI please merge ❤️

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
visualize 92.0KB 92.8KB +883.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
visualize 27.6KB 27.6KB +28.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @alexwizp

@alexwizp alexwizp merged commit dc45560 into elastic:master Jul 19, 2021
Legacy visualizations automation moved this from In progress to Done Jul 19, 2021
alexwizp added a commit to alexwizp/kibana that referenced this pull request Jul 19, 2021
* [Visualize] Client Side caching

Closes: elastic#102622

* apply caching for returning to originatingApp

* fix case with 'save as' functiionality

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
alexwizp added a commit that referenced this pull request Jul 19, 2021
* [Visualize] Client Side caching

Closes: #102622

* apply caching for returning to originatingApp

* fix case with 'save as' functiionality

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:feature Makes this part of the condensed release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.15.0 v8.0.0
Development

Successfully merging this pull request may close these issues.

[Visualize] Client Side caching
4 participants