...2.8秒 第二次则会下降到0.6秒 使用xhprof调试发现瓶颈位于 XSServer::read 中的 fread() 占用的时间是整个php开销的98.1% 这个是存储性能瓶颈导致的? 谢谢
这是C/S程序,fread是从网络上读取数据。应该是你要看性能要看服务端的,你这个应该是文件系统没有缓存所以第一次比较慢。
...ce=csv --clean demo Object id #9 #0 lib/XS.php(2080): XSServer->read(8) #1 lib/XS.php(2065): XSServer->getRespond() #2 lib/XS.php(2042): XSServer->execCommand(Array, 201) #3 lib/XS.php(2003): XSServer->setProject('demo') #4 lib/XS.php(1986): XSServer->open('8383') #5 lib/XS...
... -c gbk -q 桌面 --limit=2 返回 Object id #10 0 ../lib/XS.php(2246): XSServer->read(8) 1 ../lib/XS.php(2231): XSServer->getRespond() 2 ../lib/XS.php(2208): XSServer->execCommand(Array, 201) 3 ../lib/XS.php(2169): XSServer->setProject('cms_51cto') 4 ../lib/XS.php(1312): XSServer->open(8384)...
... -c gbk -q 桌面 --limit=2 返回 Object id #10 0 ../lib/XS.php(2246): XSServer->read(8) 1 ../lib/XS.php(2231): XSServer->getRespond() 2 ../lib/XS.php(2208): XSServer->execCommand(Array, 201) 3 ../lib/XS.php(2169): XSServer->setProject('cms_51cto') 4 ../lib/XS.php(1312): XSServer->open(8384)...
... from server completely (SIZE:0/8, REASON:closed) #0 ../lib/XS.php(1911): XSServer->read(8) #1 ../lib/XS.php(1896): XSServer->getRespond() #2 ../lib/XS.php(1880): XSServer->execCommand(Array, 208) #3 Indexer.php(180): XSServer->setTimeout(1000) #4 {main}
...E:0/8, REASON:closed) #0 /usr/local/xunsearch/sdk/php/lib/XS.php(2105): XSServer->read(8) #1 /usr/local/xunsearch/sdk/php/lib/XS.php(2090): XSServer->getRespond() #2 /usr/local/xunsearch/sdk/php/lib/XS.php(2067): XSServer->execCommand(Array, 201) #3 /usr/local/xunsearch/sdk/php/lib/XS.php(202...
...IZE:0/8, REASON:closed) #0 /usr/local/xunsearch/sdk/php/lib/XS.php(2385): XSServer->read(8) #1 /usr/local/xunsearch/sdk/php/lib/XS.php(2367): XSServer->getRespond() #2 /usr/local/xunsearch/sdk/php/lib/XS.php(1088): XSServer->execCommand(Array, 201, 128) #3 /usr/local/xunsearch/sdk/php/lib/XS.php...
...SIZE:0/8, REASON:closed) #0 /usr/local/xunsearch/sdk/php/lib/XS.php(2385): XSServer->read(8) #1 /usr/local/xunsearch/sdk/php/lib/XS.php(2367): XSServer->getRespond() #2 /usr/local/xunsearch/sdk/php/lib/XS.php(1088): XSServer->execCommand(Array, 201, 128) #3 /usr/local/xunsearch/sdk/php/lib/XS.php(23...
...rch/run/sdk/php/lib/XS.php on line 367 Object id #9 #0 lib/XS.php(1799): XSServer->read(8) #1 lib/XS.php(1784): XSServer->getRespond() #2 lib/XS.php(1761): XSServer->execCommand(Array, 201) #3 lib/XS.php(1732): XSServer->setProject('demo') #4 lib/XS.php(1715): XSServer->open('8383') #5 lib/XS...