@DTS Engineer I think that I got general understanding of the issue that occurs. In our application we still depend on TVML Kit (which is marked as deprecated already). On many screens we use the stackTemplate with collectionList that contains big numer of shelfs (10-20) with lockups that allow to horizontally scroll the rows. Based on investigation of what is going on with memory I see that TVML engine does its best to speedup the process of rendering the lockup elements to provide the best experience while doing the quick scroll through the all shelfs. To handle it, the TVML uses some kind of rasterisation mechanism for TVML elements and display them as a single image in TVStackedImageView. It leads to issues in case of using the first generation of apple TV as rastered elements are kept in memory as long as the template keeps alive. There is a big difference in memory consumptions in case of using 4k display and 1080p. It seems to be related to fact that created images for 4K displays are bigger and in result consumes more memory.
I assume that we indeed get the crash from JS context panic_out_of_memory but it is happening because we hit the memory limit. So its not caused by big memory consumptions of JS engine but because of fact that the biggest part of memory is already consumed by ImageIO region. So JS context may crash after doing any update of TVML DOM or after parsing some response from our API
So in next step I should focus how to reduce usage of that region which should help to solve that crash. But that may be hard assuming that's something fully managed by TVML Kit.
Topic:
Safari & Web
SubTopic:
General
Tags: