Re: [Arsperl-users] Queries on 'HPD:HelpDesk' taking too long.
Brought to you by:
jeffmurphy
|
From: Deepak P. <dee...@am...> - 2007-04-17 04:07:02
|
I tried the non-OO type execution, and it worked faster (about 7
seconds). I noticed performance degrade when there is form information
to download (e.g. openForm in OO approach, and ars_GetFieldTable in
non-OO approach).
Sticking with non-OO approach for now !
Thanks everyone for help
- Deepak
On Mon, 2007-04-16 at 14:03, Deepak Parasam wrote:
> My intention of using ARS perl was to query remedy to get tickets status
> (updates), in near real-time.
>
> Here's a snippet:
>
> use ARS;
> ...
> $f = $c -> openForm ('HPD:HelpDesk');
>
> @e = $f -> query (-query => "'Category' = \"AWS\" AND 'Type' = \"Subway
> 2.0\" AND 'Item' = \"Operations\" AND 'Case ID+'=\"0003044848\"");
> print "Iterating...\n";
> foreach (@e){
> @arr = $f -> get (-entry => $_, -fields => [1, 8]);
> foreach $field (@arr){
> print "Field: " . $field . "\n";
> }
> }
>
> --- Though this works, it takes about 15 minutes (on an average) to
> complete execution. Bulk of this time goes in opening the form.
> When I ran strace, I could see that there were lots of poll calls,
> reads, and writes to the remedy server (remedy-1).
>
> Any ideas to improve the performance ?!
>
> - cheers,
> Deepak
>
|