Library "v30/bslDefender.brs"
sub Main()
screen = CreateObject("roScreen")
port = CreateObject("roMessagePort")
screen.setMessagePort(port)
codes = bslUniversalControlEventCodes()
timer = CreateObject("roTimespan")
timer.Mark()
m.fps = 0
while(true)
msg = port.GetMessage() ' get a message, if available
if type(msg) = "roUniversalControlEvent" then
print "count: "; m.fps; ", total fps: "; (m.fps/(timer.TotalMilliseconds()/1000))
end if
m.fps ++
end while
end sub
"EnTerr" wrote:
Because "dotting" is expensive! Do not be doting on (ab)using "m.vars" - instead use local variables, those are much faster.
m.thing = "bar"
varr = {foo:"bar"}
"squirreltown" wrote:
So if I do this in main()m.thing = "bar"
varr = {foo:"bar"}
retrieving "bar" from varr will be faster than m in other functions because I have to pass varr as a parameter, making it local?
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!