<?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: PHPc: Compiler Theory and Ranting</title>
	<atom:link href="http://jacobsantos.com/2006/general/phpc-compiler-theory-and-ranting/feed/" rel="self" type="application/rss+xml" />
	<link>http://jacobsantos.com/2006/general/phpc-compiler-theory-and-ranting/</link>
	<description>Rumblings, rants, essays, stories by Jacob Santos about Web Site Development, Persistent Browser-Based Games, personal journal, and Programming.</description>
	<lastBuildDate>Mon, 01 Feb 2010 19:53:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jacob Santos</title>
		<link>http://jacobsantos.com/2006/general/phpc-compiler-theory-and-ranting/comment-page-1/#comment-38</link>
		<dc:creator>Jacob Santos</dc:creator>
		<pubDate>Wed, 02 Aug 2006 02:39:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.santosj.name/?p=259#comment-38</guid>
		<description>@amedjones

No, not really. What it does is convert the smart tags to PHP tags, it has nothing to do with optimizing Database connections. It uses caching to save from accessing the database on every page load. The issue of the Smarty caching is that you have to decide how you want to split the pages out, so that some areas can be reloaded with database or other dynamic data.



What I would have liked is if Smarty or PHP compiled and saved pages using the PHP byte code to further save from parsing and compiling. Just like how Smarty saves a parsed page converted to PHP to save from parsing the smarty tags on each page loading, it would save a lot of time if PHP also saved the parsed, byte code page.

If PHP was compiled, then it could make the decision itself on how many times the database needs to be accessed and when data in the database changed. You can create a framework yourself for when database data becomes &quot;dirty&quot; and the page needs to be recached, but you would need to use an outside means, like Sessions, a file, or a database table.</description>
		<content:encoded><![CDATA[<p>@amedjones</p>
<p>No, not really. What it does is convert the smart tags to PHP tags, it has nothing to do with optimizing Database connections. It uses caching to save from accessing the database on every page load. The issue of the Smarty caching is that you have to decide how you want to split the pages out, so that some areas can be reloaded with database or other dynamic data.</p>
<p>What I would have liked is if Smarty or PHP compiled and saved pages using the PHP byte code to further save from parsing and compiling. Just like how Smarty saves a parsed page converted to PHP to save from parsing the smarty tags on each page loading, it would save a lot of time if PHP also saved the parsed, byte code page.</p>
<p>If PHP was compiled, then it could make the decision itself on how many times the database needs to be accessed and when data in the database changed. You can create a framework yourself for when database data becomes &#8220;dirty&#8221; and the page needs to be recached, but you would need to use an outside means, like Sessions, a file, or a database table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amedjones</title>
		<link>http://jacobsantos.com/2006/general/phpc-compiler-theory-and-ranting/comment-page-1/#comment-37</link>
		<dc:creator>amedjones</dc:creator>
		<pubDate>Tue, 01 Aug 2006 16:27:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.santosj.name/?p=259#comment-37</guid>
		<description>Good read indeed.

Php does have it&#039;s ups and downs but then again what program doesn&#039;t?
also the idea of php compiler is already out there, its only in a form on a framework or template. For example Smarty is a really good template engine that &quot;compiles &quot; your code to save web browser from accessing database on every click.</description>
		<content:encoded><![CDATA[<p>Good read indeed.</p>
<p>Php does have it&#8217;s ups and downs but then again what program doesn&#8217;t?<br />
also the idea of php compiler is already out there, its only in a form on a framework or template. For example Smarty is a really good template engine that &#8220;compiles &#8221; your code to save web browser from accessing database on every click.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://jacobsantos.com/2006/general/phpc-compiler-theory-and-ranting/comment-page-1/#comment-36</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 01 Aug 2006 12:34:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.santosj.name/?p=259#comment-36</guid>
		<description>PHP doesn&#039;t try very hard to optimize because it&#039;s going to tear everything down again at request shutdown. For the average script, the cost of optimization outweighs the benefits received over that one run of the script.

Maybe we could use a pragma. &#039;declare optimization=PHP_OPT_LARGE&#039; or so. But then you&#039;d need people to debug and maintain the optimizer.</description>
		<content:encoded><![CDATA[<p>PHP doesn&#8217;t try very hard to optimize because it&#8217;s going to tear everything down again at request shutdown. For the average script, the cost of optimization outweighs the benefits received over that one run of the script.</p>
<p>Maybe we could use a pragma. &#8216;declare optimization=PHP_OPT_LARGE&#8217; or so. But then you&#8217;d need people to debug and maintain the optimizer.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
