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

ENH javascript compression #618

Open
tomMoral opened this issue Jul 16, 2023 · 2 comments
Open

ENH javascript compression #618

tomMoral opened this issue Jul 16, 2023 · 2 comments

Comments

@tomMoral
Copy link
Member

The javascript code is getting larger and larger and it is encoding directly in the HTML page, making it larger.
To reduce its impact, it is probably possible to use javascript compression tools such as slimit that can be used to compress the js before embedding it?

Before doing this, it would be important to assess how large the size gain would be, as this obfuscates the code in the page and can make debugging harder.

@Badr-MOUFAD
Copy link
Member

Or we can decide on minifying the js file based on whether Benchopt is in DEBUG mode?

@Melvin-klein
Copy link
Member

slimit is no longer maintained (last commit from 2018). However, there is https://pypi.org/project/jsmin/ that works well. When combining result.js and symbols.js in a single file I get 41ko. After minifying with jsmin, I get 25ko.

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

No branches or pull requests

3 participants