Welcome Guest, Not a member yet? Register   Sign In
asset? server load? just static
#1

[eluser]devbro[/eluser]
hi everyone

I am new to ci, but experienced in coding and php Smile.

I saw the asset concept and really liked it. It makes life very easy when it comes to managing multiple js and css.

I got one concern here:
asset loading goes thru ci and it puts a extra load on the server. this extra load is not due to original request to the server, but due to the second request to fetch the css or js file. but these files can be simply fetch directly with no php involvement.

is it a concern to worry about this little extra load? are there any other solution other than asset manager classes?

is there any asset manager class that would simply give out the static url of the files?
#2

[eluser]tonydewan[/eluser]
My concern for performance was one of the reasons I built Carabiner. Many of the other asset management libraries serve PHP files directly. Instead, Carabiner serves static JS/CSS files.

Of course, you've still got some additional PHP being parsed and executed during a normal page load, but there really isn't any way around that that I can see. I understand the concern there, but it has so far proved to not be a concern for me. In fact, when files are minimized/combined, I see a definite improvement in overall page load. Sometimes (with many large files) as much as 50% quicker! Your trading some extra server load for reduced HTTP requests and smaller file sizes.

However, even if your using an asset library that doesn't minify or combine, you still gain programmer productivity. And, as the saying goes "Hardware is cheap, but programmers are expensive."




Theme © iAndrew 2016 - Forum software by © MyBB