<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">
Reposted from <a 
href="https://dylanwh.tumblr.com/post/169334782317/looking-back-at-bugzilla-and-bmo-in-2017">Dylan's
 tumblr</a> with permission.<br>
  <br>
-----8<-----<br>


            

            
  <ul id="posts">
<li class="post group" style="padding:0">  

                        

                        

                        

                        

                        

                        <section class="group caption_and_post_info
                            
                            
                            
                            
                            
                        ">
                            
                                <section class="caption group">
                                    <h2><a 
href="https://dylanwh.tumblr.com/post/169334782317/looking-back-at-bugzilla-and-bmo-in-2017">Looking
 back at Bugzilla and BMO in 2017</a></h2>
                                    <div class="cont group"><h1>Looking 
Back</h1><p>Recently in the <a 
href="http://t.umblr.com/redirect?z=https%3A%2F%2Fair.mozilla.org%2Fbugzilla-project-meeting-20180103%2F&t=ZjExOTA3ZGFlOWY1MzM1OWU1OTEwOGIwNjViYWEzM2JmOGZkMjY3Nyx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bugzilla
 Project meeting</a>,
 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.</p><p>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.
See <a 
href="http://t.umblr.com/redirect?z=https%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1427884&t=ZmQ5ODEyZWUwMDY1ZTRiNzZlMzkwMDM3OWE3YjA3NmMxMWEzYjE1Nyx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1427884</a> for one of the blockers to this.</p><h2>Accessibility 
Changes</h2><p>In
 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. :-)</p><h2>Infrastructure Changes</h2><p>BMO is 
quite happy to use <a 
href="http://t.umblr.com/redirect?z=https%3A%2F%2Fmetacpan.org%2Frelease%2FCarton&t=MWI1NmFmYTlhMmM2NjI4OTdiYzA4ZDdhZmRjMDhhODVlM2FlNTVlZix4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">carton</a>
 to manage its perl dependencies, and Docker handle its system-level 
dependencies.</p><p>We’re quite close to being able to run on 
Kubernetes.</p><p>While
 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.</p><h2>Performance Changes</h2><p>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.</p><h3>February</h3><ul><li><a
 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1336958&t=YmQ3YjBkNjhkZGJjZGNiMDM3NzUxNDNkZTBiYzNiNjVkNmMxNTZmOSx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1336958</a> - HTML::Tree requires manual memory management or it leaks 
memory. I discovered this while looking at some unrelated code.</li><li><a
 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1335233&t=NGQwZTBlNTljMTQ5OTA1OGVjMmU5NDYyY2YyNGQwODY4NTlmMjEzYSx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1335233</a> - I noticed that the job queue runner wasn’t calling the 
end-of-request cleanup code, and a result it was also leaking memory.</li></ul><h3>March</h3><ul><li><a
 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1345181&t=YjZlYmE5ODFmY2I0Y2I3ZmYwYjRiYjFmOGEzMTEzOWZiZWRlNzJlOSx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1345181</a> - make html_quote() about five times faster.</li><li><a 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1347570&t=OTJlMzJjM2FhMTZlMWQyZjBlYzY4NzAzZDc4YWFkMDQ3NzNiY2FlMix4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1347570</a>
 - make it so apache in the dev/test environments didn’t need to restart
 after every request (by enforcing a minimum memory limit)</li><li><a 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1350466&t=Y2M3YWRiYTc4OTVkMTVmMzZhMTdmNGVjNzBiODZlZWQxNjcyODlhMix4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1350466</a> - switched JSON serialization to JSON::XS, which is nearly 
1000 times faster.</li><li><a 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1350467&t=OWY3MGMzNzUxN2YyODIwYzIzNTQ4YzQ3MzMxNjZlOGY2NDU0MmZlNyx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1350467</a> - caused more modules (those provided by optional features)
 to be preloaded at apache startup.</li><li><a 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1351695&t=ZWQ0ZjY0ZWM5NTk3NmY3NjZmNGZhNWQ1ZDVkOWE0MDMyOTg1MjVhZSx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1351695</a> - Pre-load “.htaccess” files and allow apache to ignore 
them</li></ul><h3>April</h3><ul><li><a 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1355127&t=MTk4M2Y4NDE0ZDQ3MzA3NDk0YWFiMTQxZTMzM2ZiOGJjZWJkY2NmMSx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1355127</a> - rewrote a template that is in a tight loop to Perl.</li><li><a
 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1355134&t=MjJlMjM2MmU3MTA1MTY5MjgzZTNiNTQxYmNiMDkwNjZmMmI0MWQ5OSx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1355134</a> - fetch all group at once, rather than row-at-a-time.</li><li><a
 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1355137&t=ZmU5OTExOGU1NDljYmY3N2QzOTAyMDRlNjUzYzYzZmUwODQyYzFmYix4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1355137</a> - Cache objects that represent bug fields.</li><li><a 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1355142&t=MGM0NTdmYTM1NjVjMWEyMDcyNjZhMTI4MjU5Yzg1ZmM3NDhmMzk0MCx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1355142</a>
 - 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.</li><li><a 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1352264&t=NjllNDdkNDU0MTJmZDU4ODUyMDNiYjEzYTMyYWEzYzc1NzZlYjYxMSx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1352264</a>
 - 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.</li></ul><h3>May</h3><ul><li><a 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1362151&t=NDlkMjQyNDVlNGRiZDRjY2RlN2Q5MTk5OWZmZTM1ZjQ5YzNlMTBhOSx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1362151</a> - Cache bzapi configuration API, making ‘bz export’ 
commands (on developer machines) faster by 2-5 seconds.</li><li><a 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1352907&t=MzFhOTQ0OTNmN2FlYTkwZTNkY2RkZTc3OGQ2YTFkZDQ3YzE3NWI5NSx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1352907</a> - Rewrite the Bugzilla extension loading system.
The previous one was incredibly inefficient.</li></ul><h3>June</h3><ul><li><a
 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1355169&t=YWQyN2IwNDM3MGNiYmQyYjVlYWZiYjM3MzhhZGEyODFmMTY1NWJhMyx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1355169</a> - Mentored intern to implement token-bucket based rate 
limiting. Not strictly a performance thing but it reduced API abuse.</li></ul><h3>December</h3><ul><li><a
 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1426963&t=NmUyMTFmNGJhNWZhZTE4Y2Q1NDNlYzFlYzY3YmQ2YzZlZjIyYmE1OCx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1426963</a> - Use a hash lookup to determine group membership, rather 
than searching an unsorted list.
<a 
href="http://t.umblr.com/redirect?z=http%3A%2F%2Fbugzilla.mozilla.org%2Fshow_bug.cgi%3Fid%3D1427230&t=OWI1MThmYzQ0ZGFkZjAzNzc1NjFmYTNlNTJiNTU5ZWIyYmIxMjg4OSx4elpxMDNEUQ%3D%3D&b=t%3A0Pgjf2A6DvxxDbdfUX1AxA&p=https%3A%2F%2Fdylanwh.tumblr.com%2Fpost%2F169334782317%2Flooking-back-at-bugzilla-and-bmo-in-2017&m=1">Bug
 1427230</a></li></ul><h2>Developer Experience Changes</h2><p>My 
favorite communities optimize for fun. Frequently fun means being able 
to get things done. So in 2017 I did the following:</p><ul><li>Made a 
vagrant development environment setup that closely mapped to BMO 
production. 
** 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.</li><li>I changed to a 
pull-request based workflow. We use Bugzilla to track bugs and tasks, 
but not do code review.</li><li>I
 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)</li><li>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 
editors.</li><li>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 
do that.</li></ul><h2>Numbers</h2><p>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).</p></div>
                                    
                                </section></section></li>
  </ul>
  <br>
-----8<-----<br>
  <br>







</body>
</html>