...turn} string 成功时返回读到的字符串 源码: sdk/php/lib/XSServer.class.php#L404 (显示) protected function read($len){ // quick return for zero size if ($len == 0) { return ''; } // loop to send data $this->check(); for ($buf = '', $size = $len;;) { ...
...2.8秒 第二次则会下降到0.6秒 使用xhprof调试发现瓶颈位于 XSServer::read 中的 fread() 占用的时间是整个php开销的98.1% 这个是存储性能瓶颈导致的? 谢谢
这是C/S程序,fread是从网络上读取数据。应该是你要看性能要看服务端的,你这个应该是文件系统没有缓存所以第一次比较慢。
... {return} XSCommand 成功返回响应指令 源码: sdk/php/lib/XSServer.class.php#L334 (显示) public function getRespond(){ // read data from server $buf = $this->read(8); $hdr = unpack('Ccmd/Carg1/Carg2/Cblen1/Iblen', $buf); $res = new XSCommand($hdr); $res->buf = $thi...
XSServer All Packages | 属性 | 方法(函数) 包 XS 继承关系 class XSServer » XSComponent 子类 XSIndex, XSSearch 版本 1.0.0 源代码 sdk/php/lib/XSServer.class.php XSServer 服务器操作对象 同时兼容于 indexd, searchd, 所有交互均...
...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...