ID:2562633
 
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
I'm a tgstation dev, more specifically I develop tgui, our UI framework. I focus on UI performance a lot, and we are able to update even the most complex UIs at constant 60 fps.

However, tgui takes a very long time to initialize. Currently, even the simplest UI takes around 120ms to initialize, out of which 90ms are spent just on opening the browser and downloading/parsing javascript (our javascript bundle is currently sitting at around 600KB in size, so it's moderately big).

I've inspected HTTP traffic coming from BYOND's integrated server with Chrome Dev Tools, and these are the headers:
Cache-Control: no-store, no-cache, must-revalidate, max-age=0
Content-Disposition: inline; filename="tgui.bundle.js"

Browser is told to not store any cache at all, and it takes around 60ms to simply download the file from the server!

I've used an external HTTP server to set the Cache-Control header to max-age=300, and page load time has dropped to 85-90ms (so about a 30ms improvement).

Strangely enough, UI render time has also dropped by 5ms (which is all DOM and javascript). Could this mean that HTTP server lives on the same thread as the browser? Why is it so CPU-intensive?

Feature: It would be very nice to set the Cache-Control header on the built-in HTTP server to let IE11 cache javascript files more effectively.

It could be configurable via some proc call. Setting cache headers globally for anything non-html would probably be a fine solution.

Thanks in advance.
Bumping this one, cache controls would allow us to make browser interfaces significantlyly faster. For reference on why we care about 30ms, the current open time is around 120ms. That's a huge speedup.
Bumping, this would do wonders for interface load speeds.
Following up on this as we're experiencing severe bugs with embedding browser windows as a result of this issue.

Will perform a second follow-up on the 28th.
bump. would do good.