Housekeeping: unused dependencies, single-line inputs, own links - #2
Merged
Conversation
Yarroo
force-pushed
the
standalone-cleanup
branch
from
August 24, 2026 13:18
281ff7f to
609c5d8
Compare
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.
Follow-up to #1, in three groups.
Snapshot correctness and cost
@snapshotand then read the ivar back, whilereset_snapshotcleared it without the mutex. Anafter_commitlanding between those two lines gavenil.values. The same gap also lost invalidations: a rebuild that started before a commit would finish afterwards and store pre-commit values under a fresh timestamp, so the process that saved a setting served the old value for a whole TTL.allhonourscurrent_scope, so a call made insiderelation.scopingwould have cached a truncated table for the whole TTL.load_configread the file, ran ERB and parsed YAML on every call, and#valueasks forall_settingstwo or three times. Building a snapshot of a thousand settings meant thousands of parses, under the mutex.reload_config!clears both.Rails compatibility
AdminUsersControllercould not work at all on a current Rails.t.text :stringso long values are not truncated, which makes formtastic infer a textarea for every plain setting. This is the other half of Fix long strings, prevent 255 char truncation slate-studio/activeadmin-settings#25.Housekeeping for a standalone repository
carrierwave,mini_magickanddeviseare not referenced anywhere since. Version goes to 0.6.0.ActiveRecord::Base; those sections only kept the removed dependencies alive in the docs.Verified on a live Rails app: 60 reads from a cold snapshot cost 1 query and the next 60 cost none; with the mutex held elsewhere a read of a stale snapshot returns in 0.1 ms instead of blocking; 3200 reads across 8 threads alongside 60 writes raise nothing; a value read after a write is fresh.