Thread:Project:Support desk/ResourceLoader vs CDN subdomain for css scripts/reply (2)

From a performance point of view, hosting stuff on different domains is bad: In order to get information from another domain, you will need a new DNS lookup and a new TCP connection. When this happens a few time during your request, it sums up and can actually be perceived, especially when using a slow connection as you usually have with mobile devices. You can calculate with around 250ms for each additional file, that has to be downloaded that way (plus the time needed to transfer the actual content, but if the file is small that should be way below 100ms). Hosting everything on the same domain will save you the DNS lookup and the time needed to get the new connection, but the ressource loader honestly is kind of a performance killer. Concatenation of CSS is nice and is the right idea, but what the ressource loader does is just slow. I have not tested it, but I would guess that transferring a number of small (minified) CSS files with separate requests will still be way faster than using the ressource loader.