On 2014-04-24, 8:31 AM, Henri Sivonen wrote:
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 .

Please allow me to upset you even further! We build and ship *all* of ICU, and presumably ship a tiny portion of it. This is at least in part due to bug 915735, you can go and read the bug to see that I did the best I could there, given the constraints that I had (not understanding how the magic of the interaction of ICU and our build system worked, not understanding which parts of ICU we actually want to use, the performance and code quality limitations of MSVC's PGO compiler, the fact that increasing the amount of time we allow our builds to progress is rocket science, etc. None of this was fun, but please understand that it wasn't like somebody sat down and decided that it's a great idea to build and ship all of ICU.

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?

No.  That is at least partly covered by bug 864843.

  * 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?

In my experience, ICU is unfortunately a hot potato. :( The real blocker there is finding someone who can tell us what bits of ICU _are_ used in the JS engine. The parts used in Gecko for <input type=number> are pretty small. And of course someone needs to figure out the black magic of conveying the information to the ICU build system.

  * Do we have any mechanisms in place for preventing stuff like the
ICU encoding converters becoming part of the building the future?

No, that is not possible to automate.

> 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?

I'm afraid we need humans for that.

  * How should we identify code that we build as part of Firefox but is
used only in other apps (Thunderbird, SeaMonkey, etc.)?

This too.

  * 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?

Nothing big comes to my mind.  Perhaps hunspell on b2g?

Cheers,
Ehsan

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to