Skip to content

Comments

refactor: [caches/memory] drop "referenced object" support #925

Draft
crandles wants to merge 3 commits intotrickstercache:mainfrom
crandles:remove-refobjects
Draft

refactor: [caches/memory] drop "referenced object" support #925
crandles wants to merge 3 commits intotrickstercache:mainfrom
crandles:remove-refobjects

Conversation

@crandles
Copy link
Contributor

@crandles crandles commented Feb 23, 2026

Changes:

  • refactor: [caches/memory] drop "referenced object" support
    • no noticeable performance differences; this optimization did not seem to be worth the complexity it caused within the overall codebase
    • calling code should be simpler now; should make it simpler to optimize the overall codebase (no more provider specific code paths)
  • chore: [tests] use t.Context() over context.Background()
    • chore: [docs/dashboards] add redis datasource to grafana
  • chore: [docs/dashboards] add more memory & request duration panels
    • added: "GOMAXPROCS" stat, 2 extra memory stats, cpu usage, go gc duration, processed bytes, frontend request duration histogram, + overall request duration histogram
    • (processed bytes not working via darwin at this time)

new panels:
Screenshot 2026-02-23 at 6 52 00 PM
more new panels:

Screenshot 2026-02-23 at 6 52 11 PM

Signed-off-by: Chris Randles <randles.chris@gmail.com>
Signed-off-by: Chris Randles <randles.chris@gmail.com>
@crandles crandles requested a review from a team as a code owner February 23, 2026 23:53
@crandles crandles marked this pull request as draft February 23, 2026 23:53
Signed-off-by: Chris Randles <randles.chris@gmail.com>
@crandles crandles marked this pull request as ready for review February 24, 2026 00:05
@jranson
Copy link
Member

jranson commented Feb 24, 2026

re: references. For the memory cache, this will add a marshal immediately before every Store and an unmarshal immediately after every Retrieve, and those get more expensive as a time series object gets bigger (has more timestamps and/or series). Just want to double check that the CPU utilization doesn't go nuts as a result. The goal was that if many users are viewing the same dashboard with a fast auto-refresh that we're not repeatedly serializing/deserializing the identical payload over and over.

@crandles
Copy link
Contributor Author

crandles commented Feb 24, 2026

sure, let me spin up a before and after load test (along with a before ristretto)

I had something going with k6 somewhere, let me revisit that.

with any luck the singleflight layer assists us there, but we could perhaps use that at another level

@crandles
Copy link
Contributor Author

good call, seeing some difference:
image

though I should increase my durations & ensure this load test is acting correctly

@crandles crandles marked this pull request as draft February 24, 2026 05:13
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