mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
* Object Window Niceties (#69825) * Object Window Niceties Alright. I got bored and polished up the object/alt click window. It had a few issues: First, we generated all our images in bulk, as soon as requested Second, the caching was global, despite only working on a client to client basis Third, we only generated up to 10 images. This could be fine, but the javascript code will continuiously rerender assuming unrendered images will come eventually, and they well, weren't. This caused MASSIVE clientside lag Fourth and finally, I did not like how moving away from the viewed turf lagged behind, in sync with the stat tab update. Looked bad. I've resolved all these. I solved the first three issues by reworking how obj images were generatated and managed. Rather then storing a basic cache on the subsystem, and doing all the image generation at once, we queue up image generation as we like, and generate images inside a new processing subsystem fire. This isn't the best solution, since it still eats cpu somewhat, but it's a whole lot better then the other options, outside either removing the need to getflat, or somehow predicting what items a client will want to see I've started storing three bits of info. First, a list of all the objects we currently want to display. Second, a list of atom -> image html Third, a list of atoms to imageify. This information is stored on a datum on /client, since I want this to have a lifetime linked to well, clients. I've used this datum to solve that fourth bit, using a component I made for parallax a bit back. This lets me react to our client's mob, and update the tab linked to that, rather then on a subsystem call by call basis. That's about it. Co-authored-by: san7890 <the@ san7890.com> * Object Window Niceties Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: san7890 <the@ san7890.com>