Recently in the Bugzilla
Gerv informed us that he would be resigning, and it was pretty clear
that my lack of technical leadership was the cause. While I am sad to
see Gerv go, it did make me realize I need to write more about the
things I do.
As is evident in this post, all of the things I’ve
accomplished have been related to the BMO codebase and not upstream
Bugzilla – which is why upstream must be rebased on BMO.
1427884 for one of the blockers to this.
2017, we made over a dozen a11y changes, and I’ve heard from a
well-known developer that using BMO with a screen reader is far superior
to other bugzillas. :-)
quite happy to use carton
to manage its perl dependencies, and Docker handle its system-level
We’re quite close to being able to run on
the code is currently turned off in production, we also feature a very
advanced query translator that allows the use of ElasticSearch to index
all bugs and comments.
I sort of
wanted to turn each of these into a separate blog post, but I never got
time for that – and I’m even more excited about writing about future
work. But rather than just let them hide away in bugs, I thought I’d at
least list them and give a short summary.
1336958 - HTML::Tree requires manual memory management or it leaks
memory. I discovered this while looking at some unrelated code.
1335233 - I noticed that the job queue runner wasn’t calling the
end-of-request cleanup code, and a result it was also leaking memory.
1345181 - make html_quote() about five times faster.
- make it so apache in the dev/test environments didn’t need to restart
after every request (by enforcing a minimum memory limit)
1350466 - switched JSON serialization to JSON::XS, which is nearly
1000 times faster.
1350467 - caused more modules (those provided by optional features)
to be preloaded at apache startup.
1351695 - Pre-load “.htaccess” files and allow apache to ignore
1355127 - rewrote a template that is in a tight loop to Perl.
1355134 - fetch all group at once, rather than row-at-a-time.
- Instead of using a regular expression to “trick” Perl’s string
tainting system, use a module to directly flip the “taint” bit. This was
hundreds of times faster.
- Compile all templates and store them in memory. This actually saved
both CPU time and RAM, because the memory used by templates is shared by
all workers on a given node.
1362151 - Cache bzapi configuration API, making ‘bz export’
commands (on developer machines) faster by 2-5 seconds.
1352907 - Rewrite the Bugzilla extension loading system.
The previous one was incredibly inefficient.
1355169 - Mentored intern to implement token-bucket based rate
limiting. Not strictly a performance thing but it reduced API abuse.
1426963 - Use a hash lookup to determine group membership, rather
than searching an unsorted list.
Developer Experience Changes
favorite communities optimize for fun. Frequently fun means being able
to get things done. So in 2017 I did the following:
vagrant development environment setup that closely mapped to BMO
** I tested installing it on various machines – Linux, OSX, Windows
** I wrote a README explaining how to use it.
** This dev environment has been tested by people with little or no
experience with Bugzilla development.
I changed to a
pull-request based workflow. We use Bugzilla to track bugs and tasks,
but not do code review.
made it so the entire test suite could run against pull requests. This
isn’t trivial, you have to work a bit harder to build docker images and
run them without having any dockerhub credentials. (Pull requests don’t
get any dockerhub credentials, I have to say to make sure my friend ulfr
doesn’t have a heart attack)
I made sure that I understood how
to use Atom and Visual Studio Code. I actually rather like the later now
– and more importantly it is easy to help out new-comers with these
I adopted Perl::Critic for code linting and Perl::Tidy
for code-formatting, using the PBP ruleset for the later. I also made it
a point to not make code style a part of code review – let the machine
In the last year, we had almost 500
commits to the BMO repo,
from 20 different people. Some people were new, and some were returning
contributors (such as Sebastin Santy).