F
F
fsamorodov2016-10-05 09:17:22
Ember.js
fsamorodov, 2016-10-05 09:17:22

Why does Ember.js take a long time to load templates?

Hello!
We are writing a project on Ember. We noticed that some templates are loaded for a very long time (2-3 seconds). These templates have a lot of {#if else} checks and plugins like #ember-power-select.
Actually the question is:
How can you optimize and speed up the loading of fat templates?
Another problem is that when switching to these templates, the application freezes. We are using Nprogress as a loading indicator, which does not fire while the template is loading, although it should fire on the willTransition event of the previous route.
Is it possible to launch the Nprogress loading indicator or any other immediately after clicking on the link without any delay?
Otherwise, there is a feeling that the application is slowing down ...
Pliz, Help :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Romanov, 2016-10-05
@fsamorodov

Hello.
Templates are not loaded, they are already in memory, they only need to be drawn, are you sure that this is the case? Look at the rendering speed in the Ember Inspector.
I recommend this article, a smaller size will work faster.
And also update to the latest version of Ember.js. Glimmer 2 is on the horizon, templates will run much faster.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question