tl;dr: Every single page view to the site generates a request for
/wafflejs. The benefit of having access to waffles in js is questionable
and there are workarounds. We should remove it.
If you go to kitsune/sumo/static/js and grep for waffle:
$ git grep waffle
browserid.js: if (!waffle.flag_is_active('browserid')) {
We are only using it once and it's for Persona (we should kill Persona
but that email is coming next). We are generating 1.5 to 2 million
requests to Apache+Django per day for this. It must die.
So, from now on, we should never check flags like this from js. If we
absolutely need to know whether a waffle is on or off, we should add a
data-* attribute to the <body/> or similar.
Any objections?
BTW, the requests for /<locale>/jsi18n/build:<build_id> are just as
problematic. I already submitted a pull request, so they should be gone
soon too:
https://bugzilla.mozilla.org/show_bug.cgi?id=952642
Happy Friday!
-Ricky