Skip to content

perf: Reduce database, build, and homepage overhead - #2

Merged
Fuwn merged 4 commits into
mainfrom
perf/reduce-overhead
Oct 11, 2026
Merged

Fuwn merged 4 commits into
mainfrom
perf/reduce-overhead

Conversation

@Fuwn

@Fuwn Fuwn commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Reduce storage overhead in new SQLite databases, improve Docker build caching, and avoid unnecessary homepage downloads. Prepare 0.1.29 while preserving existing counter behaviour.

Changes

  • Remove the redundant identity index from new SQLite tables while retaining identity uniqueness, AUTOINCREMENT, and unique counter names.
  • Reuse the cached theme layer for source-only Docker builds. Changes to themes or their synchronisation script still invalidate it.
  • Drop unused font styles, use textContent for embed snippets, and defer mascot loading until its viewport breakpoint becomes visible. Preserve snippet escaping, newlines, resize handling, and older media-query listeners.
  • Bump the package version to 0.1.29.

Compatibility

This change introduces no database migration. Existing SQLite databases retain their data, schema, and indexes; database storage savings apply to newly created tables. Counter increment SQL, PostgreSQL behaviour, response caching, name encoding, and SVG rendering remain unchanged.

Validation

  • Formatting, compilation, all 10 Gleam regression tests, PostgreSQL 17 integration checks, and Nix builds on Linux and macOS passed.
  • ARM64 and AMD64 container builds and HTTP checks passed. AMD64 execution used emulation. Hosted CI passed all four jobs.
  • Existing SQLite data, timestamps, schema, and indexes were preserved in compatibility checks using disposable database copies. Concurrent increments, restart, and rollback to 0.1.28 passed.
  • Mobile and desktop browser checks passed for snippets, escaping, resizing, and older media-query listeners. External image-host failures limited mascot rendering checks; Safari was not tested.
  • Measured workloads showed no reproducible server CPU, memory, or throughput regression. New-database size decreased by 14%, and decoded font stylesheet data decreased by 84%.

Fuwn added 4 commits October 11, 2026 04:39
The integer primary key already guarantees identity uniqueness, so new
databases can avoid a separate identity index. Keep existing tables intact
and retain AUTOINCREMENT so deleted identities are not reused.
@Fuwn
Fuwn merged commit f7ffde6 into main Oct 11, 2026
4 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