On Sat, Feb 14, 2004 at 08:19:20AM +0100, wolf blaum wrote:
> If you are asking how to teel between:
> $var=⊂
> and
> ⊂
Pretty much, from the point of view of sub.

> However, there is a way to tell who asked for the result:
> read perldoc -f caller
Not really what I want.

> but why dont you pass a parameter to the sub that tells it?
Because there are about a dozen subs and I didn't want to change the API 
on all of them, along with all the places they are being called from. 
However, I resolved it, not quite so elegantly, but introducing a 
'keepResults' method to the class that has the subs, which allows it to 
be toggled. In my optimisation attempts I ended up stumbling into 
another issue however, somewhat unrelated.

I set it up, so that if the results aren't needed, they aren't even read 
from the network socket. This means that if the remote program is taking 
its time to generate them, the Perl program doesn't have to wait for 
data it'll be throwing away. I added a counter to see how much data we 
are ignoring, so that when we finally do need something, we know how 
much to discard. However, I found that if the the queue of data got 
above one, one of two things happens: either the Java program at the 
other end discards the extra XML elements sent to it while processing 
ones that take a while, or replies get lost. Either way, the Perl end 
sits there waiting for data that never arrives. If I can be bothered, I 
might put debugging code into the Java to see whats happening, at that 
end.

However, if anyone has a clue as to what's going please let me know (the 
more data I can safely ignore, the faster my program can run :)

-- 
Robin <[EMAIL PROTECTED]>                 JabberID: <[EMAIL PROTECTED]>

Hostes alienigeni me abduxerunt. Qui annus est?

PGP Key 0x776DB663 Fingerprint=DD10 5C62 1E29 A385 9866 0853 CD38 E07A 776D B663

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to