I have a fundamental question about the architecture of my ember app. Currently I use a ton of observers, and when I updated to the latest version of ember, I now get hundreds of warnings about that (I already disabled them so I can continue developing, but that’s probably not a permanent solution). I wonder whether there is any way to get rid of them.
My application is special in that it uses WebGL for rendering. This API is different than traditional web rendering in that it’s imperative rather than declarative. My observers trigger whenever anything in my model changes, so I can rerender my viewport. I don’t think I can switch to a computed property, because a WebGL canvas isn’t something you compute.
One of the side effects of trying to integrate ember with this concept is that under some conditions, my observer is triggered multiple times for fundamentally the same change, which leads to many unnecessary redraws.
Can somebody give me some hints on how to improve the architecture there? Moving away from WebGL is not an option (until WebGPU is available, but I’m not sure whether that even solves the problem).