Bubel ECS - Entity-Component-System architecture implementation
Mergul
wismerchil at interia.eu
Tue Mar 9 15:21:26 UTC 2021
On Tuesday, 9 March 2021 at 14:29:37 UTC, Meta wrote:
> Awesome! In the demo, I noticed that if there are >3000
> entities spawned, there will be periodic dips in the FPS. Could
> this be Javascript's GC kicking in?
What browser are you using? I've tested couple of browsers. In
general JavaScript shouldn't be a problem, from what I know WASM
only growth its memory. Library itself almost never call malloc
(so memory is always allocated). On firefox I had problem with
FPS most of a time and I'm not sure what cause this problem (I
found several bug reports which could be related to that).
Besides Firefox every web browser I tested was based on chromium
engine. I didn't see any periodic dips, even with <200k entities.
Maybe there is some problem related to WebGL or JS Workers. When
JS side detects that WASM threads are enabled in browser it loads
multithreaded version of WASM code and spawn workers. But overall
multithreaded execution is always more stable for me.
Another thing is that application has to work in the "unblocking"
way. It means that main thread has to release control to web
browser every frame and browser sometime takes more CPU time.
And last thing, I'm not specialist in web technologies so it
could be something else what I'm not aware of :)
More information about the Digitalmars-d-announce
mailing list