Skip to content

feat(ctr): Bundling, optimise assets, page weight/memory improvements#168

Merged
mrjvs merged 6 commits intodevfrom
work/ctr-bundle
Sep 25, 2025
Merged

feat(ctr): Bundling, optimise assets, page weight/memory improvements#168
mrjvs merged 6 commits intodevfrom
work/ctr-bundle

Conversation

@ashquarky
Copy link
Member

@ashquarky ashquarky commented Sep 22, 2025

Resolves #XXX

Changes:

  • Bundle ctr code. This allows for tree shaking etc. Including Pjax with the bundler also means one less http request during page load.
  • Only deliver debug.js to non-console UAs. It had a check in it to do nothing on console, so why download the 25KiB?
  • Re-created various images and theme assets to compress better. Stylesheet goes from 82KiB to 37KiB. Also included the raw assets in the repo, in case we swap to a better system of inlining.
  • Calls cave.requestGc after PJAX page loads. This is supposed to help alleviate RAM issues on O3DS a bit, but more probably needs doing.

@ashquarky ashquarky requested a review from mrjvs September 22, 2025 12:28
@ashquarky
Copy link
Member Author

Before:
image
After:
image

Note this was done without working CDN, so the real page weight is a lot more from all the images, but that's a different PR :)

Saves about 25KiB for 99% of users
I recreated most of these assets from scratch since the old ones had noise and other artefacts. the noise-free versions compress better, which dramatically reduces the size of the stylesheet.
@ashquarky ashquarky requested a review from mrjvs September 25, 2025 13:58
Copy link
Contributor

@mrjvs mrjvs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@mrjvs mrjvs merged commit c93999d into dev Sep 25, 2025
10 checks passed
@mrjvs mrjvs deleted the work/ctr-bundle branch September 25, 2025 21:03
@ashquarky ashquarky mentioned this pull request Dec 28, 2025
4 tasks
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.

2 participants