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

JS and CSS not properly compressed/uglified #8327

Closed
zhujunsan opened this issue Aug 15, 2018 · 7 comments
Closed

JS and CSS not properly compressed/uglified #8327

zhujunsan opened this issue Aug 15, 2018 · 7 comments
Milestone

Comments

@zhujunsan
Copy link

self hosting metabase using the docker image:

metabase/metabase      latest              3ea53572d627

which is also tagged as v0.30.0

The front-end assets are not compressed at all, all of them are in plain text together with all the comment.
For example the vendor.bundle.js alone is 7.18MB in size, 1.7MB after nginx's gzip. It's abnormally large for a web page asset.

I think it's a packing issue during the build but I'm unfamiliar with front-end building/packing staff, hope it can be fixed soon.

Thanks.

@lwqcz
Copy link

lwqcz commented Aug 15, 2018

I've checked and my installation via *.jar file under Ubuntu environment is showing the same issue.

@cleydsonjr
Copy link

Hi guys, could you please share a possible fix date for this problem?

@dannyeuu
Copy link

We had to implement Cache and compression for CSS and JavaScript files at NGINX proxy level, cuz the download of this files cause the Metabase slow initial loading

@cleydsonjr
Copy link

cleydsonjr commented Sep 25, 2018

@jornh I think there are two different problems:

  1. The assets are not being transferred compressed by default (this can be easily fixed by a reverse proxy using nginx or apache http)
  2. The CSS and JS files are not minified (there are spaces, line breaks, comments and long variable names). I think this can only be fixed during the build fase.

@jornh
Copy link
Contributor

jornh commented Sep 26, 2018

Yep! I think you’re right. At least it seems fixing either of the two problems would both work towards improving performance in the same area 😄 That’s probably what confused me.

Anyway, agree they are technically different - not dupes - just related...

@kdoh kdoh added this to the 0.31 milestone Sep 26, 2018
@tlrobinson
Copy link
Contributor

The JavaScript bundles are being gzipped by Metabase's server, even without a reverse proxy such as nginx:

screenshot 2018-10-30 11 41 00

If you are seeing otherwise please give me more details about your deployment (Metabase version, Docker image vs JAR, hosting platform, browser, etc)

I'll take a look at why minification isn't being applied.

@tlrobinson
Copy link
Contributor

Fixed minification here: #8834

We also accidentally disabled caching in a recent release, which I'll fix in #8834 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants