ID:2840249
 
BYOND Version:515.1596
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 108.0.0.0
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary: When using RenderIcon() running a client in a local copy of Dream Seeker it still seems to be doing some kind of network round trip, this causes RenderIcon() to take upwards of 200-300ms to give a result, despite the client having the ability to relay those results to the server without any kind of network usage at all. This isn't exactly a BUG, but more of what I imagine is a lack of shortcut that could probably exist to make RenderIcon() a much faster process when you're doing local batch operations.

(Mind you I haven't done any profiling of the network or anything here, it just seems to be way slower than it should be in this usecase, can't the client just dump the icon into the server's memory since they're the same process?)


Code Snippet (if applicable) to Reproduce Problem:
var/obj/test_obj = new() // Just make sure it has some kind of icon to send
client/verb/RenderTest()
src << "Started at [time2text(world.timeofday)]"
src.RenderIcon(test_obj)
src << "Finished at [time2text(world.timeofday)]"

RenderIcon yield to get client input
It's very likely given how byond handles these things that this yield is only "waking up" at the start of the next tick.
I doubt it's networking costs is what I'm saying. My opinion sorta lives and dies on your world fps tho
Yeah, definitely not network overhead. Makes me cringe wondering how long this proc would take to do any good in a live environment. This delay on top of that delay.

Was running the tests at 100 FPS.
This is likely doing 3 to 5 disk operations given how i know byond handles dealing with icon data. watch documents/byond/cache for disk activity during the test.
You can actually see it in both the cache and dyn.rsc file size. After a few chunky operations the dyn.rsc is up over 1GB and grows rapidly the entire time. Definitely too much going on to use it for any larger or more complex operations, especially over the network.

Maybe for tiny stuff, but even then you're looking at least 100-200ms for *any* operation over the network, plus the time it takes for it to actually do what it's doing.

Nice to have, probably nearly useless for anything but generating images locally. You can't even use it to off-load things to startup because it has to wait for a client.

One potential benefit of using it with lots of people online is you could probably leverage multiple clients to do batch operations, but they might not appreciate that if it's not something for them directly.