mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
set micro sec. of stream_select() to 200000
reduces cpu load if timeout was set to 0
This commit is contained in:
parent
8ac0a99e09
commit
ae1afe4c23
|
@ -42,7 +42,7 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
|
|||
do {
|
||||
$timeleft = $timeout - time();
|
||||
$read = array($pipes[1]);
|
||||
stream_select($read, $write = NULL, $exeptions = NULL, $timeleft, NULL);
|
||||
stream_select($read, $write = NULL, $exeptions = NULL, $timeleft, 200000);
|
||||
|
||||
if (!empty($read)) {
|
||||
$output .= fread($pipes[1], 8192);
|
||||
|
|
|
@ -75,7 +75,7 @@ class SeedDMS_Preview_Previewer {
|
|||
do {
|
||||
$timeleft = $timeout - time();
|
||||
$read = array($pipes[1]);
|
||||
stream_select($read, $write = NULL, $exeptions = NULL, $timeleft, NULL);
|
||||
stream_select($read, $write = NULL, $exeptions = NULL, $timeleft, 200000);
|
||||
|
||||
if (!empty($read)) {
|
||||
$output .= fread($pipes[1], 8192);
|
||||
|
|
|
@ -47,7 +47,7 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
|
|||
do {
|
||||
$timeleft = $timeout - time();
|
||||
$read = array($pipes[1]);
|
||||
stream_select($read, $write = NULL, $exeptions = NULL, $timeleft, NULL);
|
||||
stream_select($read, $write = NULL, $exeptions = NULL, $timeleft, 200000);
|
||||
|
||||
if (!empty($read)) {
|
||||
$output .= fread($pipes[1], 8192);
|
||||
|
|
Loading…
Reference in New Issue
Block a user