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

Don't use SVG please

170 views
Skip to first unread message

Anthony Ricaud

unread,
Apr 16, 2014, 5:26:42 PM4/16/14
to mozilla-...@lists.mozilla.org
With all the new screen densities, we all want a good way to not have n
versions of each icon in the tree. Short story: SVG is not (yet) that
good way.
So please do not add SVG files in the tree.
Reviewers: Do not accept SVG files.

Short explanation: SVG slows down app launch, uses more memory and that
memory is not freed when the app is in the background.


-------------
Long explanation
At [1], you'll find the about:memory dumps for a file with 200 PNGs, 200
SVGs or 200 paragraphs with the letter a.

Load times:
SVG: ~4500ms
PNG: ~1600ms
Text: ~850ms

Memory when the app is foreground:
SVG: 41.24MB
PNG: 10.41MB
Text: 8.15MB

Memory when the app is in the background:
SVG: 40.54MB
PNG: 9.06MB
Text: 8.07MB

You can do the benchmark again by putting the _index.html file in the
template app and switching the image to use.
Background was measured after opening the app and pressing the home button.
Foreground was measured after opening the app, pressing the home button
and opening the app again.


If anyone sees anything stupid about this benchmark, let me know.

[1] http://ricaud.me/mozilla/svg-benchmark/

Kyle Huey

unread,
Apr 16, 2014, 7:19:43 PM4/16/14
to Ehsan Akhgari, Matt Claypotch, mozilla-...@lists.mozilla.org, Anthony Ricaud
On Wed, Apr 16, 2014 at 3:50 PM, Ehsan Akhgari <ehsan....@gmail.com> wrote:
> On 2014-04-16, 6:46 PM, Matt Claypotch wrote:
>>
>> Have we filed bugs to ensure the (theoretically) correct method (SVG) is
>> improved in the platform?
>
>
> Yes, please file those bugs!
>
> Thanks,
> Ehsan
>
>
> _______________________________________________
> dev-gaia mailing list
> dev-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-gaia

Presumably the problem is that we don't discard SVG images?

- Kyle

Ehsan Akhgari

unread,
Apr 16, 2014, 6:50:23 PM4/16/14
to Matt Claypotch, Anthony Ricaud, mozilla-...@lists.mozilla.org

ARNAU MARCH CASTILLO

unread,
Apr 16, 2014, 6:26:36 PM4/16/14
to Anthony Ricaud, mozilla-...@lists.mozilla.org
Thanks Anthony,
I have assigned the bug he was mentioning (951593).
Please feel free to take it to move icon fonts forward, as I have no knowledge in the platform side.
What is documented in that bug is as far as I can go.
Having vector graphics in gaia would be a huge win for our UI.

Arnau

On 16 Apr 2014, at 23:45, Anthony Ricaud <ant...@ricaud.me> wrote:

> On 16/04/14 23:26, Anthony Ricaud wrote:
>> With all the new screen densities, we all want a good way to not have n
>> versions of each icon in the tree. Short story: SVG is not (yet) that
>> good way.
>> So please do not add SVG files in the tree.
>> Reviewers: Do not accept SVG files.
> I forgot to mention that the path forward here is using icon fonts and that work is happening in https://bugzilla.mozilla.org/show_bug.cgi?id=951593. And we're looking for people to drive this forward. There's a 300ms startup gain for the Settings app.
> _______________________________________________
> dev-gaia mailing list
> dev-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-gaia


________________________________

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx

Dylan Oliver

unread,
Apr 16, 2014, 7:07:19 PM4/16/14
to mozilla-...@lists.mozilla.org
It's worth noting that the approach in
https://bugzilla.mozilla.org/show_bug.cgi?id=951593#c32 is proposing a
solution where the icon font is only available to certified apps at the
same time we're having discussions here about moving Gaia apps out of
the certified space.


On 16 Apr 2014, at 14:45, Anthony Ricaud wrote:

> On 16/04/14 23:26, Anthony Ricaud wrote:
>> With all the new screen densities, we all want a good way to not have
>> n
>> versions of each icon in the tree. Short story: SVG is not (yet) that
>> good way.
>> So please do not add SVG files in the tree.
>> Reviewers: Do not accept SVG files.

Matt Claypotch

unread,
Apr 16, 2014, 6:46:10 PM4/16/14
to Anthony Ricaud, mozilla-...@lists.mozilla.org
Have we filed bugs to ensure the (theoretically) correct method (SVG) is improved in the platform?
On Wed, Apr 16, 2014 at 2:26 PM, Anthony Ricaud <ant...@ricaud.me> wrote:
With all the new screen densities, we all want a good way to not have n versions of each icon in the tree. Short story: SVG is not (yet) that good way.
So please do not add SVG files in the tree.
Reviewers: Do not accept SVG files.

Short explanation: SVG slows down app launch, uses more memory and that memory is not freed when the app is in the background.


-------------
Long explanation
At [1], you'll find the about:memory dumps for a file with 200 PNGs, 200 SVGs or 200 paragraphs with the letter a.

Load times:
SVG: ~4500ms
PNG: ~1600ms
Text: ~850ms

Memory when the app is foreground:
SVG: 41.24MB
PNG: 10.41MB
Text: 8.15MB

Memory when the app is in the background:
SVG: 40.54MB
PNG: 9.06MB
Text: 8.07MB

You can do the benchmark again by putting the _index.html file in the template app and switching the image to use.
Background was measured after opening the app and pressing the home button.
Foreground was measured after opening the app, pressing the home button and opening the app again.


If anyone sees anything stupid about this benchmark, let me know.

[1] http://ricaud.me/mozilla/svg-benchmark/

Anthony Ricaud

unread,
Apr 16, 2014, 5:45:13 PM4/16/14
to mozilla-...@lists.mozilla.org
On 16/04/14 23:26, Anthony Ricaud wrote:
> With all the new screen densities, we all want a good way to not have n
> versions of each icon in the tree. Short story: SVG is not (yet) that
> good way.
> So please do not add SVG files in the tree.
> Reviewers: Do not accept SVG files.

Tim Chien

unread,
Apr 17, 2014, 12:31:45 AM4/17/14
to Kyle Huey, Matt Claypotch, Ehsan Akhgari, Anthony Ricaud, mozilla-...@lists.mozilla.org
According to
https://bugzilla.mozilla.org/show_bug.cgi?id=992346

icon font takes time to load and get ready too.


This probably require more investigation on the platform too.

On Thu, Apr 17, 2014 at 7:19 AM, Kyle Huey <m...@kylehuey.com> wrote:
> On Wed, Apr 16, 2014 at 3:50 PM, Ehsan Akhgari <ehsan....@gmail.com> wrote:
>> On 2014-04-16, 6:46 PM, Matt Claypotch wrote:
>>>
>>> Have we filed bugs to ensure the (theoretically) correct method (SVG) is
>>> improved in the platform?
>>
>>
>> Yes, please file those bugs!
>>
>> Thanks,
>> Ehsan
>>
>>
>> _______________________________________________
>> dev-gaia mailing list
>> dev-...@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-gaia
>
> Presumably the problem is that we don't discard SVG images?
>
> - Kyle
> _______________________________________________
> dev-gaia mailing list
> dev-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-gaia



--
Tim Guan-tin Chien, Engineering Manager and Front-end Lead, Firefox
OS, Mozilla Corp. (Taiwan)

Gabriele Svelto

unread,
Apr 17, 2014, 4:33:54 AM4/17/14
to Kyle Huey, Ehsan Akhgari, Matt Claypotch, Anthony Ricaud, mozilla-...@lists.mozilla.org
On 17/04/2014 01:19, Kyle Huey wrote:
> Presumably the problem is that we don't discard SVG images?

The only SVG-related MemShrink bug I could find is the following:

https://bugzilla.mozilla.org/show_bug.cgi?id=686875

It looks like nobody really looked into SVG memory consumption and with
limited use of SVG graphics on the web that's unsurprising. It's a
chicken and egg problem.

Gabriele

signature.asc

Yura Zenevich

unread,
Apr 17, 2014, 10:17:02 AM4/17/14
to dev-...@lists.mozilla.org
On 2014-04-16, 5:45 PM, Anthony Ricaud wrote:
> On 16/04/14 23:26, Anthony Ricaud wrote:
>> With all the new screen densities, we all want a good way to not have n
>> versions of each icon in the tree. Short story: SVG is not (yet) that
>> good way.
>> So please do not add SVG files in the tree.
>> Reviewers: Do not accept SVG files.
> I forgot to mention that the path forward here is using icon fonts and
> that work is happening in
> https://bugzilla.mozilla.org/show_bug.cgi?id=951593. And we're looking
> for people to drive this forward. There's a 300ms startup gain for the
> Settings app.
There's also a potential here to have a good impact on accessibility
from the get go when using the icon fonts. Please feel free to cc myself
or eeejay on bugs related to the icon font work.

yura

Vivien Nicolas

unread,
Apr 17, 2014, 10:41:20 AM4/17/14
to dev-...@lists.mozilla.org


On 17/04/2014 06:31, Tim Chien wrote:
> According to
> https://bugzilla.mozilla.org/show_bug.cgi?id=992346
>
> icon font takes time to load and get ready too.
>
>

More on this in bug 948856 and bug 951593.

> This probably require more investigation on the platform too.
>
> On Thu, Apr 17, 2014 at 7:19 AM, Kyle Huey <m...@kylehuey.com> wrote:
>> On Wed, Apr 16, 2014 at 3:50 PM, Ehsan Akhgari <ehsan....@gmail.com> wrote:
>>> On 2014-04-16, 6:46 PM, Matt Claypotch wrote:
>>>>
>>>> Have we filed bugs to ensure the (theoretically) correct method (SVG) is
>>>> improved in the platform?
>>>
>>>
>>> Yes, please file those bugs!
>>>
>>> Thanks,
>>> Ehsan
>>>
>>>
>>> _______________________________________________
>>> dev-gaia mailing list
>>> dev-...@lists.mozilla.org
>>> https://lists.mozilla.org/listinfo/dev-gaia
>>
>> Presumably the problem is that we don't discard SVG images?
>>

Julien Wajsberg

unread,
Apr 17, 2014, 12:41:14 PM4/17/14
to Anthony Ricaud, mozilla-...@lists.mozilla.org
Le 16/04/2014 23:26, Anthony Ricaud a écrit :
> With all the new screen densities, we all want a good way to not have
> n versions of each icon in the tree. Short story: SVG is not (yet)
> that good way.
> So please do not add SVG files in the tree.
> Reviewers: Do not accept SVG files.
>
> Short explanation: SVG slows down app launch, uses more memory and
> that memory is not freed when the app is in the background.
>
>
> -------------
> Long explanation
> At [1], you'll find the about:memory dumps for a file with 200 PNGs,
> 200 SVGs or 200 paragraphs with the letter a.

But it's quite a synthetic benchmark.

What about replacing 5 png icons with 5 svg icons?


signature.asc

bu...@junglecode.net

unread,
Apr 17, 2014, 12:59:33 PM4/17/14
to mozilla-...@lists.mozilla.org
Please file a Gecko bug with this benchmark as the STR:
http://ricaud.me/mozilla/svg-benchmark/

We've been investing in Gecko SVG performance lately, with much of the recent work logged in these bugs:
https://bugzilla.mozilla.org/show_bug.cgi?id=703159
https://bugzilla.mozilla.org/show_bug.cgi?id=997735

We want to make sure our perf work is allowing Gaia to use vector art when needed. If the benchmark above captures your use cases, we'll measure our progress against it. Please file the bug.

Thanks,

--Jet

Tim Chien

unread,
Apr 18, 2014, 12:07:44 PM4/18/14
to Vivien Nicolas, dev-...@lists.mozilla.org
On Thu, Apr 17, 2014 at 10:41 PM, Vivien Nicolas <vnic...@mozilla.com> wrote:
> On 17/04/2014 06:31, Tim Chien wrote:
>>
>> According to
>> https://bugzilla.mozilla.org/show_bug.cgi?id=992346
>>
>> icon font takes time to load and get ready too.
>
> More on this in bug 948856 and bug 951593.
>

Right, will respond to these bugs too.

BTW people also found woff font cause performance issue on Tarako
https://bugzilla.mozilla.org/show_bug.cgi?id=992150

hey...@gmail.com

unread,
Apr 23, 2014, 1:26:08 AM4/23/14
to mozilla-...@lists.mozilla.org
On Friday, 18 April 2014 02:59:33 UTC+10, bu...@junglecode.net wrote:
> Please file a Gecko bug with this benchmark as the STR:
>
> http://ricaud.me/mozilla/svg-benchmark/

I've filed https://bugzilla.mozilla.org/show_bug.cgi?id=999931 to track any work to make SVG performance/memory good enough for use as icons in Gaia apps.

Anthony, if there are any more details you can provide about acceptable performance/memory bounds for SVG icons please add them to the bug.
0 new messages