Hacker News new | ask | show | jobs
by randallu 4739 days ago
Saying "Animation in jQuery relies on CPU and Memory" is silly if you use translateZ(0) to create a composited layer which uses a tremendous amount more memory.

WebKit at least will create a composited layer for the duration of a transition/animation all by itself -- if you do choose to use translateZ(0) everywhere, understand that it consumes texture memory the whole time the element is in the DOM (and not display:none) and maybe has a backing store in heap as well. So if you want your page to not crash Mobile Safari on older Apple devices then use it judiciously.

1 comments

Thanks for pointing this out; is there some further information you could point me to? Much appreciated!
If you have access to apple developer videos from WWDC for the past few years (not sure about 2013) they've talked about the translateZ(0) trick in the webkit / safari / css videos. It has been awhile and I don't currently have access but the impression left with me was "you don't need to do this anymore".