Closed Bug 1199563 Opened 5 years ago Closed 2 years ago

[browser] Replace SVG with icon font

Categories

(Firefox OS Graveyard :: Gaia::TV, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: yifan, Unassigned)

References

Details

(Whiteboard: [ft:conndevices])

The browser app on TV makes use of SVG extensively. SVGs need to be replaced with icon font for better performance.
See Also: → 1156635
Whiteboard: [ft:conndevices][partner-blocker] → [ft:conndevices]
Do you have performance numbers that indicate the cost of SVG vs PNG? I thought we got SVG fast enough not to have to compromise.
Thank you Zibi! Actually no. This is more like a follow up bug for the consensus that SVG generally is slower than PNG, and in TV icon font is a more concise way than injecting SVG code in the HTML(though extract SVG out will do, too). I probably missed updates on SVG performance, can you give me some insight on it? Thanks!

Hi Rex, would like to know your thoughts on this, thanks!
Flags: needinfo?(rexboy)
Flags: needinfo?(gandalf)
Depends on: 1200078
No longer depends on: 1200078
You can probably start with bug 1027080 - there's a lot of work to make SVG perform well enough for you not to have to fall back on PNG.

NI on :jwatt and :roc as they should be able to tell you if this change is necessary.
Flags: needinfo?(roc)
Flags: needinfo?(jwatt)
Flags: needinfo?(gandalf)
We've used icon fonts in TV and Gaia for a while to prevent performance cost on svg while keeping vector rendering. This wouldn't cause quality lost on graphics since we don't need to rasterize it to PNG.
If SVG performance has been improved enough, I'm ok to use SVG for browser app as well.
Flags: needinfo?(rexboy)
(In reply to yifan [:yifan][:yliao] from comment #2)
> Thank you Zibi! Actually no. This is more like a follow up bug for the
> consensus that SVG generally is slower than PNG, and in TV icon font is a
> more concise way than injecting SVG code in the HTML(though extract SVG out
> will do, too).

I'd suggest doing some experiments to see if icon fonts help in your particular case and make a decision from there. Whether SVG is slow relative to PNGs or icon fonts depends very much of the use case.

> I probably missed updates on SVG performance, can you give me
> some insight on it? Thanks!

The improvements that I am aware of occurred about a year ago and are detailed in my comments in bug 999931 comment 8 and later. There are various open bugs blocking that one that would help. Bug 1054016 also has useful information for anyone who wants to understand some of the remaining issues.

(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #3)
> NI on :jwatt and :roc as they should be able to tell you if this change is
> necessary.

We could dig into the details of the TV code and try and make educated guesses based on that. The right thing to do would be for the folks working on the TV code to take some performance measurements and decide for themselves based on that and any other trade-offs.

If someone does take some measurements it would be good if they could detail the method they use and their results so that others can reproduce and dig into any performance issues.
Flags: needinfo?(roc)
Flags: needinfo?(jwatt)
Priority: P1 → --
(In reply to Zibi Braniecki [:gandalf][:zibi] from comment #3)
> You can probably start with bug 1027080 - there's a lot of work to make SVG
> perform well enough for you not to have to fall back on PNG.

The issues in bug 1027080 are mainly around the use of SVG filters in the Firefox UI. If you can replace SVG with icon fonts, you don't have filters to worry about, so whatever performance issues you have with SVG will be different to bug 1027080.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.