<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>互联网，请记住我 &#187; php性能</title>
	<atom:link href="http://www.162cm.com/archives/category/php%e6%8a%80%e6%9c%af/feed" rel="self" type="application/rss+xml" />
	<link>http://www.162cm.com</link>
	<description>一米六二，绝不转载</description>
	<lastBuildDate>Wed, 08 Sep 2010 12:17:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>稍显寒酸的一个PHP框架:supermin</title>
		<link>http://www.162cm.com/archives/1170.html</link>
		<comments>http://www.162cm.com/archives/1170.html#comments</comments>
		<pubDate>Sun, 15 Aug 2010 14:57:54 +0000</pubDate>
		<dc:creator>一米六二</dc:creator>
				<category><![CDATA[php性能]]></category>
		<category><![CDATA[php技术]]></category>

		<guid isPermaLink="false">http://www.162cm.com/?p=1170</guid>
		<description><![CDATA[我曾经很长时间不搞什么PHP框架(框架神马的最讨人厌鸟) 我身边很多哥们,都是PHP大牛,所以,每人都写了自己的PHP框架,所以,其实我用不管谁的框架看上去都挺得罪人的,嗯,于是我只能是啥框架也不用了. 不过前一阵团队某个人自己引入了一个框架,然后做完了一个项目,接下来就拍拍屁股走人鸟~~ 于是我总结了几个规律,我称之为徐氏定律: 如果一个项目只有一个人全盘负责,这个人一定会离职; 如果一个项目你不盯着,一定会出问题; 如果让一个人自己负责一个东西,不搞个需求评审过一下,他肯定会假想一堆需求; 如果一个程序员去设计一个框架,他肯定想着跨平台,多引擎支持,肯定想着做到老少咸宜男女通吃. 于是我决定写一个真正够用的好用的框架,在公司内部强行推介一下,你可以不用框架,但是如果你要用的话必须用我的框架;没有经过一大堆同事的评审和我的许可,你不可以使用自己写的框架,尤其是,我们基本没有工夫让谁写个牛B的框架&#8230;. 嗯,于是回家我就开始搞,用了两个晚上,加起来一共不到20个小时的时间,我的超小精框架出厂了,我一向猥琐,嗯,也给起了个猥琐的名字:SM.嗯,全称是:supermini. 几百行代码而已,但是我觉得已经够用了,主要封装两个东西,一个是数据库访问,可以帮您连数据库和拼凑sql语句,另一个东西是一个Form表单生成工具. 这是一个很有特色的框架,嗯,其实连框架都称不上,就一个600来行的小lib而已,都还没有在生产环境上进行过实验,所以暂时不放代码出来.不过这个小框架包含了我对PHP的理解,嗯,每一种框架都是作者的程序哲学的体现.先来个PPT介绍一下基本逻辑.这个PPT是HTML5做的,请用chrome观看. 详情请参见:&#8221;迷你PHP框架supermini简介&#8221;. 本文由蝌蚪安尼友情赞助.]]></description>
		<wfw:commentRss>http://www.162cm.com/archives/1170.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>用PHP和xapian构建全文检索[转]</title>
		<link>http://www.162cm.com/archives/1054.html</link>
		<comments>http://www.162cm.com/archives/1054.html#comments</comments>
		<pubDate>Sun, 18 Apr 2010 14:04:34 +0000</pubDate>
		<dc:creator>一米六二</dc:creator>
				<category><![CDATA[php性能]]></category>
		<category><![CDATA[译文]]></category>

		<guid isPermaLink="false">http://www.162cm.com/?p=1054</guid>
		<description><![CDATA[大约从07年起,本博客就不转载了; 这篇算是以译文发的,原文在:http://www.contentwithstyle.co.uk/content/searching-with-xapian-and-php ========邪恶的分割线============ 有的时候呢,嗯 ,mysql 就是不够快;尤其是在做全文检索的时候.各个字段都得正确地检索才行,而当我们的各个字段带有不同的权重时,事情就马上变得特别复杂了,这时你就需要xapian来救急了. Xapian是什么东东 xapian是一个全文检索库,就和lucene和sphinx一样;它需要从c++代码编译,比较底层;现在已经有直接可用的php,perl,python绑定可以用了.目前提供了redhat和ubuntu的包;你可以在Mac os上编译,还可以通过cygwin来在windows下运行. 示例脚本 我不想去解释why和how,我只想展示一个简单的脚本;我封装的php文件有点大,读者可以从这下载; db.sql CREATE DATABASE `demo`; &#160; CREATE&#160;TABLE `demo`.`demo` ( `id`&#160;INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `unique_key`&#160;VARCHAR( 255 ) NOT NULL , `name`&#160;VARCHAR( 255 ) NULL DEFAULT &#8230; <a href="http://www.162cm.com/archives/1054.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://www.162cm.com/archives/1054.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP版的slow-query</title>
		<link>http://www.162cm.com/archives/999.html</link>
		<comments>http://www.162cm.com/archives/999.html#comments</comments>
		<pubDate>Wed, 04 Nov 2009 09:32:51 +0000</pubDate>
		<dc:creator>一米六二</dc:creator>
				<category><![CDATA[php性能]]></category>
		<category><![CDATA[php技术]]></category>

		<guid isPermaLink="false">http://www.162cm.com/?p=999</guid>
		<description><![CDATA[slowphp是由本人开发的一个简单的PHP扩展。目的在于记录web server上执行时间过长的php脚本。用法和mysql上的slow query极为相似。 代码地址:http://github.com/xurenlu/slowphp/.本周内即可完成全部功能。 版本: 1.0 示例:在php.ini中加入: extension=slowphp.so [slowphp] slowphp.long_query_time=3 slowphp.long_query_log=&#34;/var/log/php_long_query.log&#34; 然后重启yapache,运行一段时间后即可查看/var/log/php_long_query.php中记录下了慢脚本的启动时间，消耗时间和脚本路径。 下一步功能: 为了方便调试，下一步将在ini中多加这样两项配置: slowphp.long_query_log_probability=0.0001 slowphp.long_query_lock_file=&#34;/tmp/open_long_query&#34; 功能分别为: 1.有0.0001的概率记录当前脚本执行时间。 2.有/tmp/open_long_query文件存在时才记录脚本运行文件。 这样一来能极大地方便线上脚本运行效率的监控。 本文由蝌蚪安尼友情赞助.]]></description>
		<wfw:commentRss>http://www.162cm.com/archives/999.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>整理了一份招PHP高级工程师的面试题</title>
		<link>http://www.162cm.com/archives/972.html</link>
		<comments>http://www.162cm.com/archives/972.html#comments</comments>
		<pubDate>Thu, 15 Oct 2009 07:31:03 +0000</pubDate>
		<dc:creator>一米六二</dc:creator>
				<category><![CDATA[js]]></category>
		<category><![CDATA[linux/unix]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php性能]]></category>
		<category><![CDATA[未分类]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[招聘]]></category>
		<category><![CDATA[面试题]]></category>

		<guid isPermaLink="false">http://www.162cm.com/?p=972</guid>
		<description><![CDATA[嗯，基本上这些题都答得好 那就&#8230; 直接上题. 1. 基本知识点 HTTP协议中几个状态码的含义:503 500 401 200 301 302。。。 Include require include_once require_once 的区别. PHP/Mysql中几个版本的进化史，比如mysql4.0到4.1，PHP 4.x到5.1的重大改进等等。 HEREDOC介绍 写出一些php魔幻方法; 一些编译php时的configure 参数 向php传入参数的两种方法。 (mysql)请写出数据类型(int char varchar datetime text)的意思; 请问varchar和char有什么区别; error_reporting 等调试函数使用 您是否用过版本控制软件? 如果有您用的版本控制软件的名字是? posix和perl标准的正则表达式区别; Safe_mode 打开后哪些地方受限. 写代码来解决多进程/线程同时读写一个文件的问题。 写一段上传文件的代码。 Mysql 的存储引擎,myisam和innodb的区别。 &#8230; <a href="http://www.162cm.com/archives/972.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://www.162cm.com/archives/972.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>用fastCGI协议进行RPC调用</title>
		<link>http://www.162cm.com/archives/560.html</link>
		<comments>http://www.162cm.com/archives/560.html#comments</comments>
		<pubDate>Thu, 06 Dec 2007 12:57:13 +0000</pubDate>
		<dc:creator>一米六二</dc:creator>
				<category><![CDATA[php性能]]></category>
		<category><![CDATA[php技术]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[rpc]]></category>

		<guid isPermaLink="false">http://www.162cm.com/archives/560.html</guid>
		<description><![CDATA[近来由于业务量急剧增长,业务种类越来越多,RPC混乱问题就凸现出来. 具体表现是: a1,a2,a3,a4 为一组服务器,为用户提供A服务. b1,b2,b3为一组服务器,为用户提供B服务. c1,c2,c3为一组服务器,为用户提供C服务. 最初各服务器各自服务是不太相关的.随着业务拓展,用户提出新的需求,我们需要 在A服务中调用B组服务器的API接口. &#8230;. 最后我们发现这样一个现象: 用户请求a1 提供服务.a1发现他需要知道另一些数据,于是调用b2的rpc服务.但是b2 上这个数据又需要c3的RPC.结果c3又需要a2来提供一些数据&#8230;. 我们的远程调用调来调去,最后把自己调晕了. 于是我开始考虑一种解决方案。 首先当然是：对远程调用加以控制和规范，避免不必要的远程调用。 接着我注意到，我们利用CURL来通过http通道进行远程调用其实是没必要的。我可以在做远程调用时，走FastCGI协议。 说干就干: 第一步：建立一个fastCGI:spawn-php #!/bin/bash &#160; ## ABSOLUTE path to the spawn-fcgi binary SPAWNFCGI=&#34;/home/y/opt/lighttpd/bin/spawn-fcgi&#34; &#160; ## ABSOLUTE path to the PHP binary FCGIPROGRAM=&#34;/home/y/opt/php/bin/php-cgi&#34; &#160; ## &#8230; <a href="http://www.162cm.com/archives/560.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://www.162cm.com/archives/560.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>php文章收集贴</title>
		<link>http://www.162cm.com/archives/498.html</link>
		<comments>http://www.162cm.com/archives/498.html#comments</comments>
		<pubDate>Sun, 14 Oct 2007 05:42:16 +0000</pubDate>
		<dc:creator>一米六二</dc:creator>
				<category><![CDATA[php性能]]></category>
		<category><![CDATA[未分类]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.162cm.com/php_wenzhang_shouji</guid>
		<description><![CDATA[ab测试数据会跳舞 *php中静态方法,函数,对象方法性能测试 *php-APC介绍 *利用web应用中的不均衡性重构你的技术细节 *把握web 开发的平衡与不平衡 *php高手之路之—狐假虎威 *PHP高手之路之—折柳为剑 *php高手之路之—纵横天下 *php高手之路之—万人之术 *php高手之路之—屠龙宝刀 *php高手之路之—绝世秘籍 *php高手之路之—返樸归真 *用PHP5.2+APC实现超酷的PHP进度条 *道可道，非常道—PHP模板技术 select id,title from * 与select * from **的速度测试。 *为什么SELECT col1,col2,col3,col4 会比SELECT * 慢? 本文由蝌蚪安尼友情赞助.]]></description>
		<wfw:commentRss>http://www.162cm.com/archives/498.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用ab来做性能测评好像不公平吧?</title>
		<link>http://www.162cm.com/archives/457.html</link>
		<comments>http://www.162cm.com/archives/457.html#comments</comments>
		<pubDate>Tue, 21 Aug 2007 15:47:14 +0000</pubDate>
		<dc:creator>一米六二</dc:creator>
				<category><![CDATA[php性能]]></category>
		<category><![CDATA[php技术]]></category>
		<category><![CDATA[ab]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[性能]]></category>

		<guid isPermaLink="false">http://www.162cm.com/archives/457.html</guid>
		<description><![CDATA[我的师兄,从某种程度上说也是我php方面的师父,和他的同事做了测评,分别是针对php4,php5的性能对比和function,class的性能对比的。 这里是师兄的对比结果 师兄的同事做的测评 但是我不认为用ab来做出的测试是合理的.理由:用ab来测试时,结果好像总似是在跳舞一样.做为证据,我将我的notebook依文本方式重启,用ab来测lighttpd的表现. 具体环境: Haier H40S Notebook RAM:1.5G CPU:CY 1.6GHz 硬盘:60G,(具体型号什么的不清楚,列个60G表示不是SCSI硬盘) OS:Fedora Core 7.0(Moonshine) web server:lighttpd 1.4.15 测试工具:ab X环境:未运行X server 命令:ab -n 10000 -c 50 http://localhost:8181/ 第一份结果: This is ApacheBench, Version 2.0.40-dev &#38;lt;$Revision: 1.146 $&#38;gt; apache-2.0 Copyright 1996 Adam &#8230; <a href="http://www.162cm.com/archives/457.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
		<wfw:commentRss>http://www.162cm.com/archives/457.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.641 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-10 05:26:37 -->
