N
N
Nikolai Antonov2017-01-15 17:25:06
JavaScript
Nikolai Antonov, 2017-01-15 17:25:06

The browser hangs from the script. How to find the reason?

How to track what and where to optimize? Should I use timeline in chrome?
Share your optimization tips. Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nwton, 2017-01-15
@Nwton

Depends on the structure of the script. The most common:
1) We run only a separate part of the script
2) Then we analyze the load along the timeline
3) If everything is in order with this part, turn it off, test another
4) As a rule, those parts where there is a setInterval, vector graphics, work with arrays, dom
Besides, specify, the browser hangs or slows down? In the first case, it is worth checking whether there are infinite loops / recursive functions in the script. In the second case, the problem may be in a large number of simultaneously processed events on the page, work with dom, or memory leaks.

T
ThunderCat, 2017-01-15
@ThunderCat

And what script hangs already know? or just hangs on the number of hung zhs?

O
Oleg, 2017-01-15
@politon

Recently, a person approached with a similar problem ... As a result, he had 100,500 tabs open in his browser with 1GB of RAM))))
In fact. What's the script?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question