Skip to content

list index performance update for wwsympa.fcgi do_lists subroutine

Created by: olivov

For some background information, we're running Sympa 6.2.54 in a RHEL 7 environment. We've got around 6,000 lists and close to 770,000 subscribers.

Since upgrading to Sympa 6.2 about two years ago, we've come across a performance issue when an authenticated user uses the "list index" page (the /sympa/lists URI) to view all lists they have access to see. This page can take quite a while to load for an authenticated user (30-45 seconds).

Digging around in the code, it appears the reason it takes a long time for this page to load in our environment is that there is a database lookup on a per list basis to check whether or not the user is either a privileged owner, owner, editor or subscriber. This lookup has become expensive for us due to the large number of active lists we have in our environment.

With this update, we've made some changes to the do_lists subroutine in wwsympa.fcgi. A hash is loaded with the user's list membership and we use hash lookups to check for user's list membership to avoid a large number of database lookups. We hope this change does not obviate any list visibility checking mechanisms for which we have not thought of but we've tried to leverage the existing list loop checking mechanism to avoid any unwanted visibility issues. This update has been vetted for Sympa 6.2.54 and we've seen a 3x performance improvement in our environment with load times (albeit long still) between 10-15 seconds.

Merge request reports