Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

With so many css and js files you increase the number of requests to the server. It's not optimal.


That'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.


If 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.


This is pretty easy to solve after the fact by combining assets.


It'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.


that's what a build process is for. organization during dev / optimization during production




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: