ownCloud performance

Hello everyone,

I’m trying to improve the overall performance of my ownCloud instances. I noticed that there was more than the half of the HTTP requests dedicated to js.

The full source of the test I ran on demo ownCloud is here.

So, fact is that there are way too many JS requests and they’re not minified.

I tried doing concatenation of several JS on the server side with minification to lower the number of requests but it’s creating CSP issues since ownCloud creates one this way default-src ‘none’;manifest-src ‘self’;script-src ‘self’ ‘unsafe-eval’;style-src ‘self’ ‘unsafe-inline’;img-src ‘self’ data: blob:;font-src ‘self’;connect-src ‘self’;media-src ‘self’;frame-src ‘self’ blob:. So I could rewrite the CSP but it’s not really clean. Well I’m still conducting tests to confirm wether it’s really the CSP’s fault.

Has anyone already improved this part ? The ideal would be that the ownCloud dev minify and concatenate anything possible.

Thanks.

1 Like

Alright some heads up.

After further testing, yes the CSP is the problem when trying to inline some CSS/JS and to concatenate some others, which was logic. So I deleted the CSP from my reverse proxy as a test this way “it works”. I could shrink down the ~90 requests on the login page to > 40, the overall size of 850KB to 600KB. You’d think it’s all solved but no since I have a huge overhead of the software to concatenate and inline for each requests that I can’t cache, plus the CSP being removed which is bad for security purposes, though I could write it properly. Nevertheless, if the dev team would go down that road (minification, concatenation, some inlines) here’s what we could get (with browser caching obviously).

Hey,

i just have found the following in https://github.com/owncloud/core/issues/35993#issuecomment-519131534 which was linked in your other thread https://central.owncloud.org/t/owncloud-expires-core-js-oc-js/21277/2:

Nevertheless minification would really be a plus.

The owncloud frontend is based on really old techniques - we will not add any major changes here.
The new frontend (codename phoenix) will take care of such stuff.

Hey tom42,

indeed optimization should come with phoenix according to the devs.
Anyway I’m a bit bumped that a parameter like asset-pipeline.enabled has disappeared.
To dedicate a domain name to assets would be great too, less cookies for js, css … but it doesn’t seem possible yet (not without heavy processing which cost me also too much overhead).

Hey,

i did the following search:

and found the following pull request which seems to contain the info why this was done:

Yes it seems, but it’s a bummer well I can’t wait for phoenix :slight_smile: