mod_perl status

Bradley Baetz bbaetz at student.usyd.edu.au
Tue Nov 19 13:40:41 UTC 2002


Over the next couple of weeks, I want to get at least show_bug running
under mod_perl. This accounts for just 40% of bmo's hits, so it should
bring us a large perf win. I'll probably do the index page too as a
trial run (another 5%), and if I can manage it, buglist.cgi (16%). Since
over 15% of bmo's page requests are static (css/js), the combination of
those should give us a very large speed improvment.

Basically, I'm going to be doing this by fixing the dependancies to the
mod_perl bug, bug 87406. Some of these are large design changes, so you
should cc youself on any of the dependancies which you may be interested
in, esp bug 87411.

The first step is to move various 'stuff' into modules, with the
(eventual) goal of removing globals.pl and CGI.pl

I have patches for templates (bug 173622) and bug_form.pl (bug 171493).
I also have an unattached patch for the DB stuff (bug 163290), but that
really requires the shadowlog to be killed first (bug 180870)

Because these patches move large chunks of code arround, they will get
conflicts; these are easy to resolve by just applying the change in one
file to the new one. If i ask you to review one of these patches, please
take that into account.

There is an issue with currently globally-pushed template objects, such
as 'user', as well as stuff like the current cgi object (ie MFORM/FORM,
when pushed to templates) I'd like to have a Bugzilla::Current module,
which is made accessable to the templates via a plugin. A template which
wants the current Bugzilla::User object would then do something along
the lines of:

[% current = USE Bugzilla::Current %]
[% myUser = current.user %]

at the top of the template.

This would also allow scripts to have this global access, although its
probably a bad idea to encourage use of this object from scripts, since
the .cgi will have access to this via the return value from
quietly_check_login (and so won't need this extra accessor) and the
modules shouldn't care about the current user - they should, in general,
be generic enough to apply to any user. Exceptions would be stuff like a
logging module, perhaps, and this may be usable for backwards
compatability.

The Bugzilla::Current thing will be set to clear itself out at the
beginning of each request (to avoid mod_perl persistency issues).

Does that sound like a solution to people, or an overengineered hack?

Bradley



More information about the developers mailing list