perf: EventCardComponent + Solid Cache for event listings#2684
Open
mroderick wants to merge 3 commits into
Open
perf: EventCardComponent + Solid Cache for event listings#2684mroderick wants to merge 3 commits into
mroderick wants to merge 3 commits into
Conversation
e26d2e2 to
5211fcb
Compare
5211fcb to
c176ed1
Compare
Collaborator
Author
|
I've tested this on staging, where it performs well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes
/events/upcomingand/events/pastrender faster by extracting a sharedEventCardComponent, adding fragment caching with Solid Cache, and removing user-specific badges from public listings.Why
The
/events/pastpage was timing out on Heroku (503). PR #2682 restored UNION ALL database-level pagination, reducing load from ~11s to ~1.3s. This PR adds view-level caching and component consolidation on top of that foundation.Changes
events/_event,workshops/_workshop,meetings/_meeting). Templates compile to Ruby methods, avoiding HAML parsing overhead.cache @event.cache_key_with_version. Auto-invalidates on model updates.script/benchmark_events.rbfor measuring againstcodebar_dump.Benchmark results (codebar_dump)
/events/pastcold/events/pastwarm/events/upcomingcoldDeployment note
solid_cache_entriestable needs creating in production databases. Run:rails db:migrate # or rails db:prepareThe table schema is in
db/cache_schema.rb.Clean history
3 commits:
deps: add solid_cache for fragment cachingchore: add benchmark script for event listing performancefeat: add EventCardComponent with fragment caching