perf: cache static files at startup #7

Merged
jperera merged 1 commit from perf/cache-static-files into main 2026-04-02 20:35:29 +02:00
Owner

Summary

  • CSS and favicon files are loaded once at server startup into in-memory caches instead of being read from disk on every HTTP request
  • Pre-compute the WebSocket ping JSON string once at module level instead of JSON.stringify() every 30 seconds

Impact

Eliminates 2 disk reads per static file request. For a dashboard that auto-reloads via WebSocket, this adds up quickly.

## Summary - CSS and favicon files are loaded once at server startup into in-memory caches instead of being read from disk on every HTTP request - Pre-compute the WebSocket ping JSON string once at module level instead of `JSON.stringify()` every 30 seconds ## Impact Eliminates 2 disk reads per static file request. For a dashboard that auto-reloads via WebSocket, this adds up quickly.
- CSS and favicon are now loaded once at server startup instead of on
  every request, eliminating disk I/O per request
- Pre-compute the WebSocket ping JSON string once at module level
  instead of every 30s interval tick
jperera force-pushed perf/cache-static-files from 4dfdb4bbc3 to db04714a0b 2026-04-02 20:35:17 +02:00 Compare
jperera deleted branch perf/cache-static-files 2026-04-02 20:35:29 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jperera/gasolineras!7
No description provided.