L PROTECTED] [mailto:
> [EMAIL PROTECTED] On Behalf Of Thilo Stapff
> Sent: Thursday, August 02, 2007 8:50 AM
> To: ARSperl User Discussion
> Subject: Re: [Arsperl-users] Performance problems
>
>
>
> $field_ids[3] contains just the field id itself.
>
>
>
> The val
you also start using:
use warnings;
use strict;
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thilo Stapff
Sent: Thursday, August 02, 2007 8:50 AM
To: ARSperl User Discussion
Subject: Re: [Arsperl-users] Performance problems
$field_ids[3] contains
$field_ids[3] contains just the field id itself.
The value of the field is in $entry{$field_id[3]}}.
You should also note that gmtime returns the month as numbers 0..11
instead of 1..12.
Anyway, an easier (and problably more reliable) method for date
formatting would be to use a module from CPA
i tried the following:
foreach my $entry_id (sort keys %entries) {
my %entry = ars_GetEntry($ctrl, $ARSschema, $entry_id, @field_ids);
print "$field_ids[3]\n";# test: print number 3 the first clicle then
nothing
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
gmtime($field_id
On 8/2/07, Paizo <[EMAIL PROTECTED]> wrote:
> i have another ( stupid question, still new to perl :| ) , if inside the the
> loop:
> [ loop snipped ]
> i want to convert some dates that are in seconds since 1970 to something
> like dd/mm/ hh.mm.ss
> if i try to read $field_ids[3] and always get
Thanks guys, that helps a lot :)
>I'd also like to know some more details about what's going wrong with
>ars_GetFieldTable. Maybe this is a bug in ARSperl and your informations
>could help me to fix it.
Don't remeber exaclty, sometimes ( rare )
(%fids = ars_GetFieldTable($ctrl, $schema)) ||
Paizo wrote:
> Hi Listeners,
>
> I have some performance problem executing a perl script working like below:
>
> [ code snipped ]
> That's take up too 1 hour for finish while using the same qualification with
> AR System User take less than 2 minuts
>
> How can i speed up that code?
>
> Thanks,
In the "foreach" loop, you are executing a separate API call for every
field. It should be much faster to fetch the whole entry with one call:
%entry = ars_GetEntry( $ctrl, $ARSschema, $entry_id, $x1,..,$xn );
die "ars_GetEntry($ARSschema,$entry_id): $ars_errstr" if $ars_errstr;
print d
8 matches
Mail list logo