How much of a performance difference is between template and templateUrl Angularjs -


What is the difference between a template and templateUrl?

Currently I'm using the template in my instructions, but because I'm passionate about performance, I would like it now, which is fast.

And if I use the template URL + $ template cache, is it faster using templates only in the instructions?

I myself was asking # 1 question on your post for another day. As no one answers before this, and I do not have enough representative to post any comment, here are my conclusions after some tests.

The best answer to your first question is that will be at the upper part of partial lazy request, when you open the Directorate (and this is only for the first time) once loaded When done, it will behave behaviorally similar to template ). Overhead is due to additional request and additional processing of the header with the browser's additional processing.

Template URL can only result in poor user experience if you load tons of different instructions at one time, and all of them have minor files in partially (That would therefore be a big difference in the small number of header data).

Normally the difference is very low, I personally prefer the template URL approach, because this code makes the cleaner more systematic.


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -