Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
EnTerr
Roku Guru

Re: Utility functions in Scene Graph SDK

"Tyler Smith" wrote:
What is the impact of multiple components including the same utils file over and over.
We have a rowlist that has over 100 items in it that each include the utils. Is this going to kill the UI thread over time?

That is a great question!
Theoretically if done well, there should be practically no impact (B/S functions are constant/literals, they carry no lexical context with them so can take memory only once and be shared between all components/threads/interpreters; the price could be as low as dictionary entry name: *fnBody). In practice i suspect they are duplicated...

Hey, you are in good position to test that - why don't you? Spin lots and lots instances of the same component until the player crashes, periodically print to console so you can see approx. how many instances it took to run out of memory. Do the same experiment WITH and WITHOUT including some massive B/S utility library in that component. And let's take a gander at the two numbers. Chances are, we'll learn something...
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.