OpenDreamProject / OpenDream

A project for running games made in the DM programming language
MIT License
186 stars 100 forks source link

Make `browse_rsc()` respect cache #1814

Closed amylizzle closed 3 weeks ago

amylizzle commented 1 month ago

For BYOND, calling browse_rsc() should be basically free if the resource already exists on the client. For OD, we were sending the whole file every time. This was very bad for goonstation's performance when a client joined, because it would basically send 40mb of crap every time and hang the client while it was doing so.

Note that browse() is supposed to block until browse_rsc() is complete, while output() is not (according to searches of the BYOND discord).

It's hard to test how much impact this will have locally, but from my testing it should probably shave off like 60 seconds from subsequent joins. Now we just need to sort out the shedload of appearances that get sent.