You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe unrelated to this effort, but the viewer and unsupported browser scripts are loaded synchronously and are super slow. Do you want me to look into this @juliushaertl?
Just wanting to point out that enabling gzip content-encoding in the webserver seems to make a huge difference in terms of transferred js file sizes. core-common.js is then for example reduced from 13.3 MB to 3.5 MB. Dashboard for example loads thus in almost half the time: 7.5s vs 12.5s before in my testing without browser cache (not the fastest network connection here).
Maybe we should suggest this in the docs at least for js files or does this come with known downsides?
Brotli seems to look even better: reduces core-common.js down to 2.0 MB. I will enable this in AIO by default with nextcloud/all-in-one#2576 for js files.
btw, it looks like for some response content is by default gzip used. Is there a reason this could not be applied by Nextcloud by default for js assets?
Agree, serving JS without gzip is a disaster. I'd be a bit careful with brotli though. You can't compress brotli on the fly; that'll be too slow. The use-case for brotli is serving pre-compressed artifacats, so need to make sure that is the case.
We can't do anything about viewer here since it has some side effects (hooks), but lazy loading the components themselves seems to do the trick for performance. nextcloud/viewer#1675
I just tested this with the login page (time with new load in new private window until it shows login form) and these are the results:
(manually tracked, so possible that they are not 100% correct but I did the test multiple times to confirm that they are not completely incorrect).
~4.12s loading time without compression
~2.76s loading time with Brotli
~3.34s loading time with Deflate
So even on the fly Brotli seems to be the fastest :)
Activity
pulsejet commentedon May 17, 2023
Maybe unrelated to this effort, but the viewer and unsupported browser scripts are loaded synchronously and are super slow. Do you want me to look into this @juliushaertl?
juliusknorr commentedon May 17, 2023
Feel free to jump in on those topics, I don't really have much time to focus on this currently. Any contributions are welcome :)
Make unsupported browser check asynchronous
Make unsupported browser check asynchronous
Make unsupported browser check asynchronous
szaimen commentedon May 20, 2023
Just wanting to point out that enabling gzip content-encoding in the webserver seems to make a huge difference in terms of transferred js file sizes. core-common.js is then for example reduced from 13.3 MB to 3.5 MB. Dashboard for example loads thus in almost half the time: 7.5s vs 12.5s before in my testing without browser cache (not the fastest network connection here).
Maybe we should suggest this in the docs at least for js files or does this come with known downsides?
szaimen commentedon May 20, 2023
Brotli seems to look even better: reduces core-common.js down to 2.0 MB. I will enable this in AIO by default with nextcloud/all-in-one#2576 for js files.
szaimen commentedon May 20, 2023
btw, it looks like for some response content is by default gzip used. Is there a reason this could not be applied by Nextcloud by default for js assets?
pulsejet commentedon May 21, 2023
Agree, serving JS without gzip is a disaster. I'd be a bit careful with brotli though. You can't compress brotli on the fly; that'll be too slow. The use-case for brotli is serving pre-compressed artifacats, so need to make sure that is the case.
pulsejet commentedon May 21, 2023
We can't do anything about viewer here since it has some side effects (hooks), but lazy loading the components themselves seems to do the trick for performance. nextcloud/viewer#1675
szaimen commentedon May 22, 2023
I just tested this with the login page (time with new load in new private window until it shows login form) and these are the results:
(manually tracked, so possible that they are not 100% correct but I did the test multiple times to confirm that they are not completely incorrect).
So even on the fly Brotli seems to be the fastest :)