<?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"
	>
<channel>
	<title>Comments on: A PHP Weakness: The Slowness of Echo</title>
	<atom:link href="http://www.brainhandles.com/2008/01/20/a-php-weakness-the-slowness-of-echo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brainhandles.com/2008/01/20/a-php-weakness-the-slowness-of-echo/</link>
	<description>Whatever's tugging at my brain handles</description>
	<pubDate>Mon, 13 Oct 2008 05:18:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Brian Rock</title>
		<link>http://www.brainhandles.com/2008/01/20/a-php-weakness-the-slowness-of-echo/#comment-5977</link>
		<dc:creator>Brian Rock</dc:creator>
		<pubDate>Sat, 26 Jan 2008 13:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainhandles.com/2008/01/20/a-php-weakness-the-slowness-of-echo/#comment-5977</guid>
		<description>Ahh, ok, now I've got it.  When you were talking about 19 vs 20 questions, I didn't realize the files were so big.

However I noticed something else while doing this.  I took the same amount of HTML (~110kb), took it out of the php tags, and had it printed as regular HTML (rather than being echo'ed).  The script still took the same amount of time (~0.26 seconds) to process it... even though it wasn't being funneled through an echo call.

So, unless PHP defaults to echo'ing all content not located in the php tags, I'm not sure if this problem can be pegged to "echo" in particular.  Although it is a good sign that our HTML files should be less than 100kb =)</description>
		<content:encoded><![CDATA[<p>Ahh, ok, now I've got it.  When you were talking about 19 vs 20 questions, I didn't realize the files were so big.</p>
<p>However I noticed something else while doing this.  I took the same amount of HTML (~110kb), took it out of the php tags, and had it printed as regular HTML (rather than being echo'ed).  The script still took the same amount of time (~0.26 seconds) to process it... even though it wasn't being funneled through an echo call.</p>
<p>So, unless PHP defaults to echo'ing all content not located in the php tags, I'm not sure if this problem can be pegged to "echo" in particular.  Although it is a good sign that our HTML files should be less than 100kb =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Bulmash</title>
		<link>http://www.brainhandles.com/2008/01/20/a-php-weakness-the-slowness-of-echo/#comment-5769</link>
		<dc:creator>Greg Bulmash</dc:creator>
		<pubDate>Mon, 21 Jan 2008 18:58:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainhandles.com/2008/01/20/a-php-weakness-the-slowness-of-echo/#comment-5769</guid>
		<description>Brian:  The eventual pages were between 140 to 150k of HTML and text (or that was the length of the page string returned by the script along with the time to execute stats).  

50k of HTML and text or thereabouts tended to be the tipping point.  Try upping it to 60 or 70k and make sure it's being output in a page being accessed in a browser via the Internet.  Based on the stuff I read, you may have more trouble reproducing if you're outputting the text to stdout or accessing the page locally.</description>
		<content:encoded><![CDATA[<p>Brian:  The eventual pages were between 140 to 150k of HTML and text (or that was the length of the page string returned by the script along with the time to execute stats).  </p>
<p>50k of HTML and text or thereabouts tended to be the tipping point.  Try upping it to 60 or 70k and make sure it's being output in a page being accessed in a browser via the Internet.  Based on the stuff I read, you may have more trouble reproducing if you're outputting the text to stdout or accessing the page locally.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Rock</title>
		<link>http://www.brainhandles.com/2008/01/20/a-php-weakness-the-slowness-of-echo/#comment-5768</link>
		<dc:creator>Brian Rock</dc:creator>
		<pubDate>Mon, 21 Jan 2008 18:31:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.brainhandles.com/2008/01/20/a-php-weakness-the-slowness-of-echo/#comment-5768</guid>
		<description>How large was the eventual page that was outputted?  I tried to replicate this type of effect, with no success.  

I tried a bunch of variations of large echos (lots of echos, one echo with lots of string concatenation, one really long echo), and the execution time always seemed to grow slowly and linearly - no big jump in execution time like you saw.

The biggest echo I tried was approx. 50kb of plain text (Lorem Ipsum text), and that didn't take long to execute at all.  I also tried some with 50 smaller echos and a large echo with ~50 string concatenations.</description>
		<content:encoded><![CDATA[<p>How large was the eventual page that was outputted?  I tried to replicate this type of effect, with no success.  </p>
<p>I tried a bunch of variations of large echos (lots of echos, one echo with lots of string concatenation, one really long echo), and the execution time always seemed to grow slowly and linearly - no big jump in execution time like you saw.</p>
<p>The biggest echo I tried was approx. 50kb of plain text (Lorem Ipsum text), and that didn't take long to execute at all.  I also tried some with 50 smaller echos and a large echo with ~50 string concatenations.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
