I put print statements in every single function in the method (30-40 of them). None gets executed between calling pparse and the print statement in pparse (which is after the timestamp). Not sure where else to look now. . .
pparse doesn't get mentioned anywhere else in the class. In general, what might happen when we have a method invocation in a class? What other code could possibly be getting executed before my timestamp? I could include all the code for the class, but it's awfully long.
I call microtime as the first line inside the method:
function pparse($handle){
//time stamp
global $pt1a;
$outcommon = microtime();
$outcommon = explode(" ",$outcommon);
$outcommon = $outcommon[1] + $outcommon[0];
$pt1a = $outcommon;
.
.
.
Rest of function
.
.
.
}
If I put several more...
It's invoked with a simple
$template->pparse('body');
Is it possible that I have php installed incorrectly? (Though I would guess that would cause it to simply fail, as opposed to just be very slow.)
Another oddity is that when I try this from different computers (this is part of a webpage)...
Time for a couple stupid questions:
Given that my timestamping is the first line of the function, why does the rest of the function even matter?
What do you mean by 'footprint'? The timestamping? When I put timestamps all over this function, everything inside runs quickly - the big step in...
Here's the function: The crap at the beginning is the timestamp. Not clear to me why what's after it should even matter as far as causing the delay is concerned.
Could there be a problem with general php configuration that might cause such an error?
function pparse($handle){
//time stamp...
I'm using php 4.3.8. I have a big class called template which has a function pparse which takes one argument.
In my code, I do a timestamp (using microtime), then I execute $template->pparse('body'). The first line of the pparse function then is another timestamp. Often 4 seconds or more...
It was installed for me - I have a dedicated server with a hosting company. I'd like to just add on apxs without going through the hassle of installing the apache entirely (and without the danger of my just screwing that up).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.