D
D
dollar2019-04-24 09:54:33
JavaScript
dollar, 2019-04-24 09:54:33

The expansion memory is growing. Where to dig?

At the same time, JavaScript memory (that is, DOM and variables, including closures) is always no higher than 11MB.

Here is an example of the Google Chrome Task Manager
5cc0057a462c8935166481.png

Memory Tab
5cc005f4808aa175263186.png

And here is the difference in snapshots, between which more than 10 hours have passed
5cc005bebb556594081839.png

At the same time, the total occupied expansion memory is steadily growing by 50MB per hour or more.

To be fair, I must say that ajax is heavily used. But it is not clear how this affects, how to fix it, where to look, and whether it is the case at all.

Closing different tabs does nothing. And he can't give. After all, tabs communicate with the extension through messages, and this is essentially a json string that cannot contain functions, links, or anything like that. Yes, and it is shown above that it is not a matter of JS heap at all.

If the extension is restarted (refresh, reload, disable-enable) without reloading the browser, then the extension memory is reset to 25MB and starts to grow again gradually.

Could there be a problem in Google Chrome itself, in its bugs?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dollar, 2019-04-24
@dollar

And the casket just opened.
С расширением всё нормально. Но самом деле потребление прыгает, но оно всегда не выше 50МБ.
Проблема была в том, что инструменты разработчика кэшируют всё, что только можно - вывод консоли, сетевые соединения, тела принятых ответов с сервера через ajax и прочее. И вот эти тела и составляли основную как бы "утечку" памяти.
То есть нужно закрыть консоль, перезагрузить расширение, - и нет проблем с якобы утечкой.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question