This provided a lot of flexibility since all of the platform features (like rendering, audio and storage) could be done natively.
However recent tests with a large number of Sprites has shown terrible lag on iOS. The strange thing was, if I played the same game through Safari on the same device, the performance was much better. CPU usage went from 100% down to 10%!
But as mentioned in the previous articles, for various security reasons Apple doesn't enable the JIT compiler on iOS except on its own apps like Safari or embedded web views.
Instead, it imports the
@replay/web package and is essentially running your game as a webpage in Safari. Playing the same game that had 100% CPU usage in v0.4, v0.5 reduced it down to just 4% CPU usage.