Skip to content

perf(env-filter): make envs cached again#12286

Merged
nimarb merged 5 commits intomainfrom
nimar/lfe-8680-cache-the-env-selector-on-dashboards
Feb 26, 2026
Merged

perf(env-filter): make envs cached again#12286
nimarb merged 5 commits intomainfrom
nimar/lfe-8680-cache-the-env-selector-on-dashboards

Conversation

@nimarb
Copy link
Contributor

@nimarb nimarb commented Feb 26, 2026

Important

Introduce caching for environment filter options to optimize data fetching in dashboard components.

  • Caching:
    • Introduce useEnvironmentFilterOptionsCache in use-environment-filter-options-cache.tsx to cache environment filter options.
    • Cache entries are keyed by projectId and time range bucket, with TTLs based on time range duration.
    • Prunes expired cache entries and deduplicates options.
  • Integration:
    • Replace direct API calls with useEnvironmentFilterOptionsCache in index.tsx of both dashboards/[dashboardId] and project/[projectId].
    • Use cached environment options for filter components and loading states.
  • UI Changes:
    • Add NoDataOrLoading component to handle loading states in project/[projectId]/index.tsx.

This description was created by Ellipsis for e2faec1. You can customize this summary. It will automatically update as commits are pushed.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Feb 26, 2026
@nimarb nimarb changed the title fix(env-filter): make envs cached again perf(env-filter): make envs cached again Feb 26, 2026
@nimarb nimarb enabled auto-merge February 26, 2026 14:31
@dosubot dosubot bot added the auto-merge This PR is set to be merged label Feb 26, 2026
@nimarb nimarb added this pull request to the merge queue Feb 26, 2026
Merged via the queue into main with commit 18bcf18 Feb 26, 2026
41 checks passed
@nimarb nimarb deleted the nimar/lfe-8680-cache-the-env-selector-on-dashboards branch February 26, 2026 15:25
@dosubot dosubot bot removed the auto-merge This PR is set to be merged label Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant