We intend to ship Gecko on RAM-constrained devices. Yet, we build and ship code that is pure bloat: code that is built with Firefox/B2G but is used only by c-c code or code that's built with Firefox/B2G but not used by anyone.
I have prepared a queue of patches that removes Netscape-era (circa 1999) internationalization code that efforts to implement the Encoding Standard have shown unnecessary to have in Firefox. This makes libxul on ARMv7 smaller by 181 KB, so that's a win. However, especially in the context of slimming down our own set of encoding converters, it's rather demotivating to see that at least on desktop, we are building ICU encoding converters that we don't use. See https://bugzilla.mozilla.org/show_bug.cgi?id=944348 . This isn't even a matter of building code that some might argue we maybe should use (https://bugzilla.mozilla.org/show_bug.cgi?id=724540). We are even building ICU encoding converters that we should never use even if we gave up on our own converters. We're building stuff like BOCU-1 that's explicitly banned by the HTML spec! (In general, it's uncool that abandoned researchy stuff like BOCU-1 is included by default in a widely-used production library like ICU.) Questions: * Are we building and shipping dead code in ICU on B2G? * The bug about building useless code in ICU has been open since November. Whose responsibility is it to make sure we stop building stuff that we don't use in ICU? * Do we have any mechanisms in place for preventing stuff like the ICU encoding converters becoming part of the building the future? When people propose to import third-party code, do reviewers typically ask if we are importing more than we intend to use? Clearly, considering that it is hard to get people to remove unused code from the build after the code has landed, we shouldn't have allowed code like the ICU encoding converters to become part of the build in the first place? * How should we identify code that we build but that isn't used anywhere? * How should we identify code that we build as part of Firefox but is used only in other apps (Thunderbird, SeaMonkey, etc.)? * Are there obvious places that people should inspect for code that's being built but not used? Some libs that got imported for WebRTC maybe? -- Henri Sivonen hsivo...@hsivonen.fi https://hsivonen.fi/ _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform