Skip to content

use static_cache for register lookups (98x throughput)#5

Merged
Esity merged 1 commit into
mainfrom
feature/static-cache-lookups
May 27, 2026
Merged

use static_cache for register lookups (98x throughput)#5
Esity merged 1 commit into
mainfrom
feature/static-cache-lookups

Conversation

@Esity

@Esity Esity commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Register#save now searches Sequel's in-memory static_cache instead of issuing per-row SELECT queries to PostgreSQL
  • Falls back to .where queries when static_cache plugin is not loaded (test/dev environments)
  • Reloads static caches after inserts/updates to keep in-memory state fresh
  • Added missing fatal/unknown methods to spec NullLogger

Impact

  • lex.register queue processing: 2.0 msg/s → 196 msg/s (98x improvement)
  • Eliminates ~200 PG round-trips per registration message for already-known extensions

Test plan

  • 75 specs pass, 0 failures
  • rubocop clean
  • Verified live: 115K message backlog draining at 196/s

…t improvement)

Register#save now searches the in-memory static cache instead of issuing
per-row SELECT queries to PostgreSQL. Falls back to .where queries when
the static_cache plugin is not loaded (test environments). Cache is
reloaded after inserts/updates to keep in-memory state fresh.
@Esity
Esity requested a review from a team as a code owner May 27, 2026 17:53
@Esity
Esity merged commit cfbbe49 into main May 27, 2026
11 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.

1 participant