Files
vgstation13/code/modules/html_interface
Ren e5bcfcb80f Merge branch 'Global-asset' into 'Bleeding-Edge'
Global Asset Cache.

This is my attempt to fix login lag.

Resources sent to clients via `browse_rsc()`, most commonly at `/client/New()`, these resources include stylesheets, images, javascript files, ... and other things used in UIs.

All these files get sent by our BYOND code in an instant, except that it takes BYOND goddamn ages to get them to the client them.

What this MR attempts to do is send files when they are first needed, instead of when the client first logs in.

The way it works:
"Assets", things that get sent to the client somewhere, are stored in a global cache, the `asset_cache`, this is an assoc list with the key being the filename on the client and the assoc value being the actual thing that gets sent, it can be anything supported by `browse_rsc()`.

Clients are stored with a list of resources they SHOULD have, this list DOES NOT persist between rounds or even client reconnections, as that would be unsafe.

When a UI (or anything in general) needs an asset, it will call `send_asset(client, asset name)`, this will send the asset and mark it as sent for that client, but only if it isn't already sent.

This works, except the issue is, `winset()` and `output()` don't get affected by the browse queue, as the HTML interface module uses these, there are issues because the UI opens before the resources arrive at the client.

~~Working on a fix for the issue, probably a `sleep()` to imitate the "lag"~~

See merge request !120
2015-08-20 20:25:34 +00:00
..
2015-08-20 04:37:17 +02:00
2015-08-20 02:23:45 -05:00
2015-08-20 04:37:17 +02:00
2015-08-20 15:45:17 +02:00
2015-08-20 04:37:17 +02:00
2015-07-11 01:28:38 -05:00
2015-07-11 01:28:38 -05:00
2015-07-11 01:28:38 -05:00
2015-07-11 01:28:38 -05:00
2015-07-11 01:28:38 -05:00
2015-07-11 01:28:38 -05:00
2015-07-11 01:28:38 -05:00
2015-07-11 01:28:38 -05:00