This takes the string "the quick brown fox", and successively replaces the "ick" bit with the string "the quick brown fox".
It uses the innerText/innerHTML/textContent property of the bordered div below, to recall from and store to, on each replacement.
With 10,000 loops, it's still only 160,019 characters long.
Points to note :-
- Using Task Manager, you can see browsers using the Chromium engine (Chrome, Edge, Opera) and FireFox taking more and more memory.
- Internet Explorer has a much lower and more constant memory amount taken, than Chromium-based browsers and FireFox.
- In terms of performance, Internet Explorer is the best with innerText. Chromium-based browsers are the best with textContent.