
|
[dokuwiki]
||
[Date Prev]
[04-2006 Date Index]
[Date Next]
||
[Thread Prev]
[04-2006 Thread Index]
[Thread Next]
[dokuwiki] Re: Performance issues
- From: Yann <yann.hamon@xxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Sat, 8 Apr 2006 10:26:52 +0200
for ($i=$index-1;hasTimestamp($loglines[$i], $rev) == 0; $i--)
$loglines_matching[] = $loglines[$i];
for ($i=$index+1;hasTimestamp($loglines[$i], $rev) == 0; $i++)
$loglines_matching[] = $loglines[$i];
Ahem,
for ($i=$index-1;$i>=0 && hasTimestamp($loglines[$i], $rev) == 0; $i--)
$loglines_matching[] = $loglines[$i];
$logsize = count($loglines);
for ($i=$index+1; $i<$logsize && $hasTimestamp($loglines[$i], $rev) == 0;
$i++)
$loglines_matching[] = $loglines[$i];
I think I missed a check there?
I'll try to rewrite the logfile parsing when I get some time, using the
fseek you suggested... If someone could review the few lines of code I
posted a few weeks ago..
Bye!
|

|