Skip to content

Conversation

@msmithstubbs
Copy link
Contributor

This PR improves performance of loading saved searches in the dashboard.

  • saved searches are loaded once, rather than N+1 queries by source
  • Adds SavedSearches.Cache - assuming saved searches aren't updated regularly so should be a good candidate for caching
  • Adds composite index to saved_searches table to exclude saved_by_user: false rows

Follow on PR will move saved searches from dashboard to modal, which will still benefit from these improvements.

Part of ANL-1178

@msmithstubbs msmithstubbs force-pushed the perf/dashboard-saved-searches branch 3 times, most recently from 5b7e4fa to f1ad955 Compare December 17, 2025 00:30
@msmithstubbs msmithstubbs marked this pull request as ready for review December 17, 2025 00:47
@msmithstubbs msmithstubbs changed the title wip: performance improvements for saved searches in dashboard perf: optimise loading saved searches Dec 17, 2025
@msmithstubbs msmithstubbs force-pushed the perf/dashboard-saved-searches branch from f1ad955 to ca5deb6 Compare January 4, 2026 20:27
hooks:
[
if(stats, do: Utils.cache_stats()),
Utils.cache_limit(100_000)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Utils.cache_limit(100_000)
Utils.cache_limit(10_000)

@Ziinc Ziinc merged commit 662ca97 into Logflare:main Jan 5, 2026
9 checks passed
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