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

Browser download 1.5 Mo to display login page #7

Open
mgodlewski opened this issue Jan 14, 2018 · 1 comment
Open

Browser download 1.5 Mo to display login page #7

mgodlewski opened this issue Jan 14, 2018 · 1 comment

Comments

@mgodlewski
Copy link

Diacamma needs lots of static resources, mainly javascript libs.

To display login page, it's 1.5 Mo of uncompressed files that are downloaded by the browser :
https://tools.pingdom.com/#!/cKPuBO/http://syndic.diacamma.org/web/index.html

This implies two issues:

  1. Server consume bandwidth. It's not possible to host it smoothly on a DSL connection.

  2. Even hosted properly, DSL clients have to wait ~3 seconds before login.

There is at least 2 ways to fix this issue:

  1. Use CDN. For example, jquery cdn: https://code.jquery.com/ (minified and compressed version takes 39ko, in comparaison with the 287ko of the uncompressed, unminified embedded version)

  2. Enable django compressor: https://django-compressor.readthedocs.io/en/latest/

Some of the js libs are already minified but I think that compression will bring the load size to ~500ko.

@mgodlewski
Copy link
Author

Hi,

I've reach this page https://github.com/Lucterios2/core/wiki/S.-Lucterios-production-server

And add these lines to nginx configuration (following https://www.techrepublic.com/article/how-to-configure-gzip-compression-with-nginx/):

   gzip on;
   gzip_vary on;
   gzip_min_length 10240;
   gzip_proxied expired no-cache no-store private auth;
   gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/xml;

With compression enabled, the login page loads with 584 ko transfered.

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

1 participant