I did some performance tests and there is no Roku player in existence that can hammer to disk the registry anywhere near 60 times per second; flushing to disk is too darn slow. My test was to write 8kb randomized data to registry, rinse, flush and repeat 100 times, time it, /100. Here are the results:
- 4200 model (Roku 3) = 23ms/flush
- 3xxx models = 49ms
- 20xx model = 71ms
There are some interesting caveats. For example, always storing the same data seems extremely fast when repeating the operation - so obviously flush() does not save to file if no real changes were made (optimization). Also, if stored data changes but is very small (one byte), timing is better (17, 34 and 23ms, respectively) - that hints that data compression and/or slow crypt routine is being used. That's why i used big and randomized string, to avoid "cheats" and be more realistic.
So. Depending on the model, if all the BrS code is doing is hammering the registry to disk, at most it can do that 14 to 43 times per second, depending on the model. But in reality, since channel has to do something else like math or graphics, it can afford to flush once per second or less - with wear-leveling it will take hundreds (if not thousands) of years to wear out the flash => not a real concern; yay for unintended consequences.
The nasty part is that if i am doing animation at 30fps, i have 33ms per frame so when trying to save the registry, i will miss a frame - which leads to a noticeable jerk. Be it once per second or once a minute, it will be a visible hiccup. There is not a chance that Registry can do its saves on a separate thread, i presume?