Skip to Content.
Sympa Menu

en - Re: [sympa-users] sub get_which

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Olivier Salaün - CRU <address@concealed>
  • To: Yavuz SERT <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-users] sub get_which
  • Date: Thu, 26 May 2005 11:05:40 +0200

Hi Yavuz,

You're right, the web WHICH action requires to run List::get_which() to get the list of menberships for the current user.
The
List::get_which() subroutine is then optimized to use the List::get_which_db() subroutine that does a single SQL query in the database and get all subscriptions at once.

Do I answer your question ?

PS : I saw on the Rosetta that you had started the translation process to Turkish. PLease let us know when the translations are mature enough ; we will add them to the CVS tree.

Yavuz SERT wrote:

In list.pm there is a function named get_which

In this function  there is a loop like this:

foreach my $l (@get_which) {

      my $list = new List ($l);

..

 

And in wwsympa.fcgi there is a loop again in do_which like this:

 

foreach my $l( &List::get_which($param->{'user'}{'email'}, $robot, $role) )

 

in the which function, sympa looks for all lists, if I am an owner or editor of the list.

For this, sympa run a query for each list.

 

So if there are a lots of lists isn’t there a lots of query for each user?

 

If I’m false I’m sorry. Can u explain the method?


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.19+.

Top of Page