Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can we remove nsIEntityConverter?

136 views
Skip to first unread message

Henri Sivonen

unread,
Apr 30, 2016, 6:26:16 AM4/30/16
to dev-platform
We ship data tables for converting from Unicode to HTML entities.
These tables obviously take space. (They are not optimized for space
usage, either.) As far as I can tell, these tables are not used at all
in Fennec. In desktop Firefox, these data tables are used only for the
MathML View Source feature.

Additionally, a subset of the tables is used by some XPCOM-based
extensions, but those extensions seem to be obsolete or abandoned or
don't seem to be using the feature for a very good reason.

These data tables are not exposed to the Web Platform.

In https://bugzilla.mozilla.org/show_bug.cgi?id=1048191 I proposed
removing this for mobile only, but how about we just remove this
altogether in order to make both Fennec and desktop Firefox smaller?

--
Henri Sivonen
hsiv...@hsivonen.fi
https://hsivonen.fi/

smaug

unread,
Apr 30, 2016, 8:16:41 PM4/30/16
to Henri Sivonen
On 04/30/2016 06:25 PM, Henri Sivonen wrote:
> We ship data tables for converting from Unicode to HTML entities.
> These tables obviously take space. (They are not optimized for space
> usage, either.) As far as I can tell, these tables are not used at all
> in Fennec. In desktop Firefox, these data tables are used only for the
> MathML View Source feature.

How much space do they actually take, roughly?

What would source view for mathml look like if we removed nsIEntityConverter?

Karl Tomlinson

unread,
May 1, 2016, 6:04:48 PM5/1/16
to
Cross-posting to mozilla.dev.tech.mathml so that this is seen by
people who are interested.

Please follow-up to mozilla.dev.platform.

Frédéric Wang

unread,
May 2, 2016, 2:46:18 AM5/2/16
to dev-pl...@lists.mozilla.org, Mozilla Math Developers
Le 01/05/2016 02:16, smaug a écrit :
> What would source view for mathml look like if we removed
> nsIEntityConverter?

AFAIK, the only point is to replace things like "∑" with "∑"
in order to make it more readable. However, with appropriate fonts
installed I think reading "∑" is also fine.

Le 30/04/2016 12:25, Henri Sivonen a écrit :
> In desktop Firefox, these data tables are used only for the
> MathML View Source feature.

Personally, I don't really use this feature, as I find the DOM inspector
or the "MathML Copy" add-on (*) more convenient to check or copy a
MathML formula.

I guess we can move this feature from the Desktop front-end to a
separate Add-on (that could potentially work on mobile too in the
future). However, I can't speak for the users. Maybe we should write to
the Math WG mailing list in order to get more feedback.

(*) https://addons.mozilla.org/en-US/firefox/addon/mathml-copy/

--
Frédéric Wang

Henri Sivonen

unread,
May 2, 2016, 3:40:32 AM5/2/16
to dev-platform
On Mon, May 2, 2016 at 9:45 AM, Frédéric Wang <fred...@free.fr> wrote:
> Le 01/05/2016 02:16, smaug a écrit :
>> What would source view for mathml look like if we removed
>> nsIEntityConverter?
>
> AFAIK, the only point is to replace things like "&#x2211;" with "&Sum;"
> in order to make it more readable. However, with appropriate fonts
> installed I think reading "∑" is also fine.

Yes, and if someone wants to special-case &InvisibleTimes; and
&InvisibleComma;, special-casing two characters takes less space than
the entire entity tables.

As for the size question, the data tables take 2336 bytes in omni.ja
plus the zip directory overhead plus the C++ code that enables the use
of these tables.

> Le 30/04/2016 12:25, Henri Sivonen a écrit :
>> In desktop Firefox, these data tables are used only for the
>> MathML View Source feature.
>
> Personally, I don't really use this feature, as I find the DOM inspector
> or the "MathML Copy" add-on (*) more convenient to check or copy a
> MathML formula.
>
> I guess we can move this feature from the Desktop front-end to a
> separate Add-on (that could potentially work on mobile too in the
> future). However, I can't speak for the users. Maybe we should write to
> the Math WG mailing list in order to get more feedback.
>
> (*) https://addons.mozilla.org/en-US/firefox/addon/mathml-copy/

Even if someone uses the current feature, special handling for
examining MathML seems like something that should be in an extension.

Frédéric Wang

unread,
May 6, 2017, 6:40:46 AM5/6/17
to Mozilla Math Developers, dev-apps-t...@lists.mozilla.org, dev-apps-...@lists.mozilla.org
Hi,

I'm resurrecting this old thread, just to say that there is now a
WebExtension implementing the "MathML view source" feature (using better
syntax highlighting and handling the invisible spaces too):

https://addons.mozilla.org/en-US/firefox/addon/mathml-view-source/

So I'm proposing to remove that feature from the core mozilla source.
The only concern I have is for Thunderbird/Seamonkey as it is not
clear yet what will be the future regarding WebExtensions.

Any opinions?

--
Frédéric Wang

J. Ryan Stinnett

unread,
May 17, 2017, 11:15:14 AM5/17/17
to Frédéric Wang, Mozilla Math Developers, dev-platform, Mozilla Thunderbird, dev-apps-...@lists.mozilla.org
As an occasional contributor to view source, I think it would be nice to
remove the MathML support from m-c like you are proposing, as it definitely
increased the maintenance burden when we reworked view source into a tab a
while ago, and my assumption is the usage of MathML view source is
relatively low (though I currently have no data to back that up).

Looking at the add-on, it seems to miss one feature: Currently in m-c, you
can select a portion of a MathML expression, choose "View Selection
Source", and see the MathML source for the selection. If that's added to
your add-on, I believe you'd have feature parity with the existing MathML
view source support.

I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1365626 to remove
MathML view source from m-c.

- Ryan
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
0 new messages