<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Follow-up To Loading CSS And JS Conditionally</title> <atom:link href="http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/feed/" rel="self" type="application/rss+xml" /><link>http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/</link> <description>where things have nothing to do with beer - tutorials, tips, how-tos, thoughts, hacks, and other techy nonsense</description> <lastBuildDate>Tue, 22 May 2012 20:57:44 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: joecr</title><link>http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/#comment-30781</link> <dc:creator>joecr</dc:creator> <pubDate>Sat, 16 Jan 2010 03:46:35 +0000</pubDate> <guid
isPermaLink="false">http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/#comment-30781</guid> <description>This in the results from a very small test that I ran, just as an idea of how much of an issue this is. I displays a form &amp; then parses the results. The time didn&#039;t really change much for the form but the memory did go up for buffering in all tests as I expected.
I remember in the books I&#039;ve read that they suggest avoiding buffering like the plague, &amp; to dump the buffer soon &amp; often if you must resort to using a buffer at all.
Display form
no buffer
Memory usage in bytes 127416
Script executed in 0.0001 seconds.
with buffer
Memory usage in bytes 127840
Script executed in 0.0001 seconds.
display results
no buffer
Memory usage in bytes 129120
Script executed in 0.0067 seconds.
with buffer
Memory usage in bytes 129528
Script executed in 0.0766 seconds.</description> <content:encoded><![CDATA[<p>This in the results from a very small test that I ran, just as an idea of how much of an issue this is. I displays a form &amp; then parses the results. The time didn&#039;t really change much for the form but the memory did go up for buffering in all tests as I expected.</p><p>I remember in the books I&#039;ve read that they suggest avoiding buffering like the plague, &amp; to dump the buffer soon &amp; often if you must resort to using a buffer at all.</p><p>Display form</p><p>no buffer</p><p>Memory usage in bytes 127416<br
/> Script executed in 0.0001 seconds.</p><p>with buffer</p><p>Memory usage in bytes 127840<br
/> Script executed in 0.0001 seconds.</p><p>display results</p><p>no buffer</p><p>Memory usage in bytes 129120<br
/> Script executed in 0.0067 seconds.</p><p>with buffer</p><p>Memory usage in bytes 129528<br
/> Script executed in 0.0766 seconds.</p> ]]></content:encoded> </item> <item><title>By: Artem Russakovskii</title><link>http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/#comment-30766</link> <dc:creator>Artem Russakovskii</dc:creator> <pubDate>Fri, 15 Jan 2010 22:38:33 +0000</pubDate> <guid
isPermaLink="false">http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/#comment-30766</guid> <description>Damn you, PHP!</description> <content:encoded><![CDATA[<p>Damn you, PHP!</p> ]]></content:encoded> </item> <item><title>By: joecr</title><link>http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/#comment-30763</link> <dc:creator>joecr</dc:creator> <pubDate>Fri, 15 Jan 2010 22:26:09 +0000</pubDate> <guid
isPermaLink="false">http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/#comment-30763</guid> <description>I avoid output buffering like the plague because I&#039;m on shared hosting &amp; I know if I do that I will go over my CPU &amp; memory limits very quickly. I only played with it on my computer.</description> <content:encoded><![CDATA[<p>I avoid output buffering like the plague because I&#039;m on shared hosting &amp; I know if I do that I will go over my CPU &amp; memory limits very quickly. I only played with it on my computer.</p> ]]></content:encoded> </item> <item><title>By: Artem Russakovskii</title><link>http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/#comment-30762</link> <dc:creator>Artem Russakovskii</dc:creator> <pubDate>Fri, 15 Jan 2010 21:59:17 +0000</pubDate> <guid
isPermaLink="false">http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/#comment-30762</guid> <description>By all means - I never said it should be done all the time.
I think ideally, the plugin author would provide an option to do so, clearly explaining the trade-offs.
I use the wp-poll feature one time here, and yet it loads on every page - it could be better to optimize it.
However, if you run polls on the sidebar or on every other posts, you wouldn&#039;t benefit from this.
Again, I&#039;d like to repeat: I don&#039;t think it should be white and black - there are clearly design decisions that need to be made by the authors and it&#039;s up to them to provide us with additional options, but if they don&#039;t know how to do it, they&#039;ll never even know to think of them, which is why discussions like this one here are invaluable.
Thanks for the feedback about output buffering. Do you have any benchmarks to back up the &quot;massive&quot; part?</description> <content:encoded><![CDATA[<p>By all means &#8211; I never said it should be done all the time.</p><p>I think ideally, the plugin author would provide an option to do so, clearly explaining the trade-offs.</p><p>I use the wp-poll feature one time here, and yet it loads on every page &#8211; it could be better to optimize it.</p><p>However, if you run polls on the sidebar or on every other posts, you wouldn&#039;t benefit from this.</p><p>Again, I&#039;d like to repeat: I don&#039;t think it should be white and black &#8211; there are clearly design decisions that need to be made by the authors and it&#039;s up to them to provide us with additional options, but if they don&#039;t know how to do it, they&#039;ll never even know to think of them, which is why discussions like this one here are invaluable.</p><p>Thanks for the feedback about output buffering. Do you have any benchmarks to back up the &#034;massive&#034; part?</p> ]]></content:encoded> </item> <item><title>By: Otto</title><link>http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/#comment-30760</link> <dc:creator>Otto</dc:creator> <pubDate>Fri, 15 Jan 2010 21:36:51 +0000</pubDate> <guid
isPermaLink="false">http://beerpla.net/2010/01/15/follow-up-to-loading-css-and-js-conditionally/#comment-30760</guid> <description>*Always* avoid output buffering if you possibly can. It has a massive negative effect on page load times in most cases, and it&#039;s a memory and CPU hog to boot.
And yes, there are cases where it makes sense to not include your script code on every page. Like if you have a dedicated gallery system or something. Sure, that makes perfect sense.
But I think that *most* plugins will probably have some kind of impact on every page. You have to weigh the costs vs. the benefits. If you&#039;re only going to not load the code on 1 out of 10 pages, then it makes no sense to add expensive PHP loops to determine that.
Figure out your use cases first, don&#039;t just assume that this will always be faster, because it won&#039;t.</description> <content:encoded><![CDATA[<p>*Always* avoid output buffering if you possibly can. It has a massive negative effect on page load times in most cases, and it&#039;s a memory and CPU hog to boot.</p><p>And yes, there are cases where it makes sense to not include your script code on every page. Like if you have a dedicated gallery system or something. Sure, that makes perfect sense.</p><p>But I think that *most* plugins will probably have some kind of impact on every page. You have to weigh the costs vs. the benefits. If you&#039;re only going to not load the code on 1 out of 10 pages, then it makes no sense to add expensive PHP loops to determine that.</p><p>Figure out your use cases first, don&#039;t just assume that this will always be faster, because it won&#039;t.</p> ]]></content:encoded> </item> </channel> </rss>
