Uncompressed size is too large


I get the error " Uncompressed size is too large" when submitting an add-on. Its size uncompressed is 135.5MB, I though the max size was 200MB 1.

Does this limitation have changed? What can be the problem?

Best regards,

I’m curious, what is so big in your addon? :slight_smile:
In any case, I can only speculate, maybe there is another limit for the javascript file size since those are being validated by some tools which may fail for big files (imagine running regex on some 50MB javascript file).

Also, I doubt the limits will change any time soon since this kind of addon size is extreme corner case.
So as a workaround, maybe instead download the data after installation? That’s a common practice for many software products that needs big data sets, like dictionaries, neural network models, filter rules, etc…

Hi, thanks for your answer.
The big thing in the addon is a JS library (sapui5). I’m trying to reduce it…

Do you know if the extension stays valid I use grunt or grunt-contrib-compress?

You can use bundler to trim libraries and even minifier to minify sources, but you will have to provide original sources and a script that can produce the minified result.

But I have to say, if I wouldn’t see it I probably wouldn’t believe that a UI runtime JS library can have 200MB!!!

It’s not normal and this may have crazy bad performance implications on user browser. Parsing such a huge JS file can take seconds and if you would load it into each page with content script, you could “break” user browser :smiley:.

For example, based on this report for Chrome, Pocket extension loads 2MB JS file in each page which slows it’s loading down by 110ms:

I’m trying to use the bundle mechanism they provide, I will see if it works.
I’m not too much worried about performances, this is actually a webapp within an extension and this is only active in its own tab.

Thank you anyway, I will need to migrate all this to a PWA…

1 Like

I think last we heard the max file size for individual files was 4MB. And from what I understand that was due to storage restrictions.

If you have minified JS files that are still bigger than 4MB you should look into webpack chunks, for example, or splitting your JS over multiple files that you load in a specific order.

1 Like