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,
One way to get an excellent increase in speed is to fetch all of the fields for each entry at once instead of individually. You should work hard to reduce the number of ars_ calls required because they involve the slowest part of this set up: the network. I'll show you a modified version of your final loop that does this. But first put your field id fetching into a loop and your field ids into an array so that they are easier to add/remove fields and pass the field ids on to the ars_GetEntry call. # Getting Field Ids my @field_names = ('something1', ... ,'somthingn'); my @field_ids; foreach my $field_name ( @field_names ){ my $field_id; ($field_id = ars_GetFieldByName($ctrl, $ARSschema, $field_name) || die "bla bla bla.\n"; push @field_ids, $field_id; } # Getting Entries foreach my $entry_id (sort keys %entries) { my %entry = ars_GetEntry($ctrl, $ARSschema, $entry_id, @field_ids); print datafile join("|", @[EMAIL PROTECTED] ) . "\n"; } I hope this helps, -- Clayton Scott [EMAIL PROTECTED] ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Arsperl-users mailing list Arsperl-users@arsperl.org https://lists.sourceforge.net/lists/listinfo/arsperl-users