I've been getting <https://github.com/joreilly/chi...
# compose-web
j
I've been getting https://github.com/joreilly/chip-8 running in Wasm based Compose for Web....it runs pretty quickly in Compose for Desktop client but is very slow on Web....are there any particular options etc to optimise code (cc @bashor)?
j
Thanks, will try that
b
According to runtime perf snapshots it doesn’t spend much CPU time. Have you tried to tune timing?
j
No, not yet
@bashor would you expect Compose for Desktop to be a lot faster than web right now?
b
Yeah, it may be faster. There is a big room for optimizations on the web
j
These ROMs ran on machines in the 70s so gessung there's something in the code that can be optimized 😃
b
I see it uses
setTimeout
(probably indirectly) which is limited in browsers for delays less ~5ms https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#reasons_for_delays_longer_than_specified Maybe that’s the reason that you are observing.
j
Away from laptop right now.... which code is using that?
b
I just looked on snapshots, there is no debug information so I don’t see names 🤷‍♂️
in the code I saw
delay