Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: precompress and cache assets #7757

Merged
merged 3 commits into from
Mar 9, 2024
Merged

perf: precompress and cache assets #7757

merged 3 commits into from
Mar 9, 2024

Conversation

benmccann
Copy link
Contributor

@benmccann benmccann commented Mar 8, 2024

Rather than using adapter-node as I originally planned, I thought it would require fewer changes to keep using adapter-static and swap out Nest's static serving for the static serving that adapter-node does. Using adapter-node might not be a bad idea still, but this just seemed easier

I tested this locally with make prod and you can see assets being served with br content encoding now

Screenshot from 2024-03-08 16-17-36

Copy link

cloudflare-pages bot commented Mar 8, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 92f1906
Status: ✅  Deploy successful!
Preview URL: https://0ed07e91.immich.pages.dev
Branch Preview URL: https://precompress.immich.pages.dev

View logs

@mertalev
Copy link
Contributor

mertalev commented Mar 9, 2024

Lighthouse likes the change - the score went from 61-62 to 65. But it's also saying the caching is inefficient for static assets:

efficient-cache-policy

@mertalev
Copy link
Contributor

mertalev commented Mar 9, 2024

On main it only shows custom.css there

@mertalev
Copy link
Contributor

mertalev commented Mar 9, 2024

It had to check for a path prefix of /_app/immutable for it to work. It's getting 66 now.

@mertalev mertalev merged commit ba55e86 into main Mar 9, 2024
25 checks passed
@mertalev mertalev deleted the precompress branch March 9, 2024 02:15
@benmccann
Copy link
Contributor Author

Thanks for catching and fixing that!

alextran1502 added a commit that referenced this pull request Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants