Skip to content

Conversation

@drewdaemon
Copy link
Contributor

@drewdaemon drewdaemon commented Nov 7, 2025

Summary

In this PoC the field specs that panels depend on are cached in the state of each panel, removing the need to load any field information through the fields endpoint when the dashboard loads.

Discover session — all fields this panel depends on are cached on the search saved object. Then, they are used to hydrate the data view.

Lens — all fields for all data views in the layers cached on the lens saved object. Then, they are used to hydrate the Lens "IndexPattern" objects which the panel depends on.

Screenshot 2025-11-10 at 2 02 45 PM

@elasticmachine
Copy link
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!

@@ -1073,7 +1079,8 @@ export class DataViewsService {
get = async (
id: string,
displayErrors: boolean = true,
refreshFields = false
refreshFields = false,
fieldSpecs?: FieldSpec[]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This new parameter allows a client to supply the fields list for the data view, removing the need for a field fetch.

initialState.serializedSearchSource
discoverServices.data,
initialState.serializedSearchSource,
initialState.fieldSpecs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here, the embeddable factory supplies the field list for the data view backing the search source. This allows the data views service to forego a fields fetch.

@drewdaemon drewdaemon changed the title [PoC] Cached field specs [PoC] Cached panel field specs Nov 7, 2025
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.

2 participants