javascript - Would it be a performance benefit to disclaim subfolders in a (web development) project folder? -
if put files (images, stylesheets, javascript, icons ...) index.html
file direct project folder; using no subfolder structure files images, css... performance benefit?
sure. big chaos. wouldn't necessary resolve paths js/vendors/jquery.js
i'm not sure @ if resolving path operations costly?
tl;dr not enough pay price of working such messy project. ans because real benefit depends upon system , connection speed client, have test it, numbers.
the performance improvement should totally negligible in modern environment. , if there any, not because of reduced ssd/hdd load.
if discard subfolders, urls shorter, save bytes when transferring page , when requesting files. because shorter urls occur @ least in html (sent client) , request headers (sent server).
the file operations on server side , overall handling of longer paths on web server should not affect performance in measurable way. of course depends upon filesystem , hardware. if webserver configured correctly, cache static content in ram (at least, while page visited), taking ssd/hdd performance out of considerations.
and keep in mind, there limit on files in single folder, if project gets big , use wrong filesystem. also, filesystems slower, if there lot of files in single directory. more details have been discussed in post: how many files can put in directory?
if want improve performance easily, have @ task runners grunt. can "build" website before publish it. can condense files minifying code.
you use grunt flatten project directory structure before publishing it.
Comments
Post a Comment