3 ms·
With so many css and js files you increase the number of requests to the server. It's not optimal.
by plainOldText 16y ago
With so many css and js files you increase the number of requests to the server. It's not optimal.
- phlid909 16y agoThat's why it's suggested you using Jammit (for Rails), or similar asset packager. Django has django-assetpackager. Or you can write your own pretty easily. Scoped selectors makes concatenating style-sheets safe.
- jpeterson 16y agoThis is pretty easy to solve after the fact by combining assets.
- sorghum 16y agoIf you have to sacrifice organization to gain performance, I think that's a sign you're doing something wrong. If number of requests is a concern, you should probably be doing asset packaging.
- Timmy_C 16y agoIt's silly not to use a bundler with Rails (both for JS and CSS). That way you don't incur the performance hit from organizing project files by controller name.
- isfinite 16y agothat's what a build process is for. organization during dev / optimization during production