Page:
Performance Principles
Pages
AI Use Disclosure
Adding Things
Architecture
Author
Background Worker
Code Layout
Command Line Modes
Common Pieces
Components and Contracts
Configuration
Database
Dev Login
Discord
Features
Frontend Layout
Frontend
Home
Installation
Logging
Look and Feel
Notifications
Performance Principles
Roadmap
Running
SSO Flow
Security
Static Data
Swap Lifecycle
Swarm Cache
Token Refresh and Caching
Updating
No results
3
Performance Principles
Nate edited this page 2026-11-21 20:21:39 -08:00
Table of contents
Performance Principles
EveSynapse is built to stay lightweight, lean, fast, and efficient at scale, without compromising features, power, or security. Three rules govern how data moves:
- Precompute at ingest, never at render. Expensive work (medians, bands, aggregates, rankings) happens once in the background worker when data arrives, and its results are stored. Page handlers never recompute what a scheduled job already computed.
- Bounded reads on every render. A page handler may only read a bounded number of rows per render (on the order of ~100). No full-table scans, no unbounded sorts or filters in Go, no per-row queries in loops. Filtering, sorting, and ranking belong in SQL with a LIMIT; anything the page needs beyond that belongs in a stored table written at ingest time.
- Resident in-memory snapshots and rings. High-traffic shared
surfaces (the search index, market stat pack and pricing stack,
recent public kill feed, SDE universe topology, entity directory,
system threat heatmap, and fleet overview rollups) are held in
RAM, updated on ingest and served on render with zero database
roundtrips. For resource-constrained hosts,
LOW_RAM_MODE=1in.envdisables memory caching and routes all reads through SQL.
Data changes on a known schedule (market sweeps complete every 30 minutes; character snapshots refresh on their own cadence), so a page that re-derives everything per load is doing repeat work for an identical answer. Under one user that is a CPU spike; under a hundred it is an outage. When in doubt, push the work into the worker and store the result.