One click pushish very slow after I put 40MB images in the images folder

One click pushish very slow after I put  40MB images in the images folder
How can I optimize the publish performance?

Solution

Hi Jack,

Every time you do 1-click publish, you are uploading your entire module (image resources included) to the server.

If you have lots of large images, you can either try and reduce their size to more manageable dimensions, or you may want to separate those images in another module (and make them public), so that you only need to upload them once.

Hope this helps

Solution

Thank you Jorge!

Jack Bao wrote:

Thank you Jorge!

how to set as public and share by another .


Hi Jack,

If you select a static image (on the Interface tab, inside the folder Images), it has a Public property you can set to Yes.

Then you need to go to the modules where you want to use the images and reference them. You can see here an example of reference something provided by another module (the example is for an Entity, but it is similar for static Images)

Separating on modules won't help ...it will actually make it worse since referenced images are kept in both consumers and producers for preview purposes. It will even make the add remove window very slow.


What is the use case here? Why do you need 40Mb of images in a module :( your end users will also suffer having to download them and complain that your application is slow.



Regards,
João Rosado

João Rosado wrote:

Separating on modules won't help ...it will actually make it worse since referenced images are kept in both consumers and producers for preview purposes. It will even make the add remove window very slow.


What is the use case here? Why do you need 40Mb of images in a module :( your end users will also suffer having to download them and complain that your application is slow.



Regards,
João Rosado

We have standard UI image templates, one image package including all images ,for easy to use,  uploading together. 

So how to solve the problem?



There is no direct recommendation that I can give without looking on what types of images you have.

But in general most modern layouts avoids the high usage of images in favor of good css styling.


In general I can think of a few recommendations, but they depend on your layouts and images.

- Use CSS styling when possible. CSS is really powerful and it allows to do most of the backgrounds and layout parts of any design

- Validate the formats and sizes of all images. It's tipical for designers to deliver uncompressed images and in large sizes (to keep the maximum quality on resizes).

- If there are big images with the same pattern, consider having a very small image with the pattern that repeats to create the full image

- If there are many little images for icons, consider using the builtin icons widget or make your own font icon. Even if the little images are not for icons it may be a good aproach to research if using "css sprites" brings enough value to use them for multiple images.


Regards,

João Rosado