Z
Z
zugo2014-09-29 02:15:14
JavaScript
zugo, 2014-09-29 02:15:14

AMD or concatenation + minification?

Which approach provides the highest speed of loading and running a web application? Asynchronously loading modules as needed (for example, using requirejs), or concatenating all JS into one file (with subsequent minification)?

It can be assumed that AMD is justified when the application has a very large amount of code, and it is better to load it in parts, and "gluing" into one file is more suitable for small applications. But maybe loading individual modules will slow down the application as a whole?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Philipp, 2014-09-29
@zugo

The download is really slow. We now have an application of about 30 modules and a very noticeable increase in download speed, if everything is put together in one bundle. It became especially noticeable after moving inside the SSL tunnel. It is recommended to do the same for CSS too.
Modularization is good and convenient for development, debugging and testing, but in production it is better to use an optimized version.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question