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

Use minify-html #94

Closed
fabriziogiordano opened this issue Mar 25, 2023 · 3 comments
Closed

Use minify-html #94

fabriziogiordano opened this issue Mar 25, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@fabriziogiordano
Copy link

This is not an issue but a feature request.

I manage a site in astro that builds about 65,000 html files.
I used astro-compress for a while and the compression phase time alone was about 45 minutes on a small server.

I recently switched to https://github.com/wilsonzlin/minify-html and now the compression time is 3 minutes, 1.5 orders of magnitude less time. Pretty incredible.

Is it possible to explore the opportunity to use this compress instead of html-minify-terser currently used?

@NikolaRHristov NikolaRHristov added the enhancement New feature or request label Mar 26, 2023
@NikolaRHristov
Copy link
Member

Hi, I have tested it before, but got about the same build times. You can try it out at https://github.com/astro-community/astro-compress/tree/minify-html to see if you have better results. If you have used the rust library that's why you probably noticed the smaller build times.

@fabriziogiordano
Copy link
Author

I will try and report back the results.
I have few astro projects running astro-compress with no problem.
This new one has 65K index.html files and the rust minification is actually making a difference in terms of speed.

@NikolaRHristov
Copy link
Member

Yeah the rust minification is cool, there aren't many libraries that support HTML minification, but the npm package uses a binding which is slower than the cli.

@NikolaRHristov NikolaRHristov self-assigned this Sep 9, 2023
@NikolaRHristov NikolaRHristov closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants