<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>https://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>https://jackxiang.com/post//</link>
<title><![CDATA[让PHP跑得更快的6种方式]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Mon, 04 Jan 2010 13:49:20 +0000</pubDate> 
<guid>https://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	以下的方式能够帮助PHP应用程序改善其扩展性。<br/><br/>1)目标代码缓存<br/><br/>每一次服务器的请求都需要PHP引擎编译并执目标代码。如果这一过程被缓存的话用户会获得更快的相应脚本。<br/><br/>在Internet上有许多目标代码的缓存解决方案（免费或者是商业产品）：<br/><br/>A) Ioncube:http://www.ioncube.com<br/><br/>B) Zend Encoder:http://www.zend.com/products/zend_safeguard<br/><br/>C) Turckl MMCache: http://freshmeat.net/projects/turck-mmcache/<br/><br/>2)模板引擎<br/><br/>模板引擎提供了缓存的另一种方式。内容缓存。 模板引擎适合于您的页面有比较多的静态数据的情况。缓存系统还提供了代码与html的分离，使得将来的维护与更新更加容易。大多数的PHP模板引擎都是免费的。<br/><br/>A) Smarty Templates: http://smarty.php.net/<br/><br/>B) Pear Templates: http://pear.php.net/package/html_template_it/redirected<br/><br/>C) PHP savant: http://phpsavant.com/yawiki/<br/><br/>3)分布式对象缓存系统<br/><br/>这一类型最广泛使用的系统是memcached(http://www.danga.com/memcached/)<br/><br/>这一类型的系统将大量的数据库数据缓存在一个内存池中。<br/><br/>他们网站有趣的一段摘录：<br/><br/>“Danga Interactive developed memcached to enhance the speed of LiveJournal.com, a site which was already doing 20 million+ dynamic page views per day for 1 million users with a bunch of webservers and a bunch of database servers. memcached dropped the database load to almost nothing, yielding faster page load times for users, better resource utilization, and faster access to the databases on a memcache miss.”<br/><br/>5)输出压缩<br/><br/>今天几乎所有的浏览器都支持一种叫做gzip压缩的东西。Gzip能够减少你的整体输出到80%，但代价是：处理器的资源消耗会增加10%。使用这一压缩类型的好处是不仅能够减少你的带宽，而且页面也会更快速的加载。<br/><br/>在PHP启用(在php.ini增加以下几行)：<br/><br/>zlib.output_compression = On<br/>zlib.output_compression_level = (level) (where level is 1-9. Youy may want to try different values to see what is best for your system).<br/><br/>如果你使用的是Apache，你可以启用mod_gzip模块.<br/><br/>6)其它有用的东西<br/><br/>当使用数据库时，只取出你实际需要的数据。这听起来很理所当然，但是我碰到项目的程序员经常使用(select * from mytable)而实际上他们可以使用(select fieldIneed from mytable)。<br/><br/>如果可能的话为数据库表建立索引<br/><br/>了解更多可以看这里：<br/><br/>An interesting blog article I found mentions many interesting tricks that can be used: http://ilia.ws/archives/12-PHP-Optimization-Tricks.html<br/><br/>an article on zend.com about measuring performance: http://www.zend.com/zend/trick/trick-optimizing-php.php<br/><br/>原文地址:http://www.whenpenguinsattack.com/2006/08/14/using-php-in-large-websites-redone/?artid=134
]]>
</description>
</item><item>
<link>https://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] 让PHP跑得更快的6种方式]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>