https://jsfiddle.net/ES4xG/8/ uses a significant share of memory.
iOS Safari uses a significant share of memory with some -webkit-transform
instructions. This approach helps delivers more complex graphics but seems to consume a lot of memory and may even cause crashes.
The demo above shows a text displayed 150 times that would otherwise run normally on a desktop OS browser:
The font size and number of elements is exaggerated to cause a crash. The -webkit-transform: translate3d(0,0,0)
is intended to force GPU accelerated drawing of each element.
Similarly, functions translateX
,Y
,Z
, scale
and others seem to be connected to GPU use in the same way. Images and sprites are also used, but they are not connected to crashes directly.
Given the scenario above:
What's the reason behind iOS Safari using a lot of memory or even crashing?
Plugging in Apple Instruments Memory Monitor, Virtual Memory climbs and seems to be the culprit of the crash. What exactly is using this memory?
Is there any other GPU accelerated approach that would not consume a lot of memory?