Skip to Content.
Sympa Menu

en - [sympa-users] do_search_list times out with large number of lists

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: k clair <address@concealed>
  • To: address@concealed
  • Subject: [sympa-users] do_search_list times out with large number of lists
  • Date: Wed, 28 Nov 2012 22:50:02 -0800

Hello,

Riseup upgraded to sympa-6.1.15 which includes the database caching patch -
yay!

We found an issue with do_search_list, though -- this function was still
regularly timing out for us, since it was still iterating over all lists.

Our original patch had something more in this function, which is that
do_search_list accessed get_lists_db directly, passing it some SQL to limit
the number of lists that get_lists would have to loop over.

I re-applied this part of the patch, and the diff follows.

- Kristina


--- a/wwsympa/wwsympa.fcgi.in
+++ b/wwsympa/wwsympa.fcgi.in
@@ -8978,7 +8978,10 @@ Sends back the list creation edition form.

## Members list
my $record = 0;
- my $all_lists = &List::get_lists($robot);
+ my $regexp = $param->{'regexp'};
+ my $statement = sprintf "name_list RLIKE '%s' OR subject_list RLIKE
'%s'", $regexp, $regexp;
+ my @lists = &List::get_lists_db($statement) || undef;
+ my $all_lists = &List::get_lists($robot, undef, @lists);
foreach my $list ( @$all_lists ) {
my $is_admin;
## Search filter




Archive powered by MHonArc 2.6.19+.

Top of Page