Closed
Bug 1313675
Opened 8 years ago
Closed 2 years ago
Poor performance of rendering danmaku on HTML5 player on Bilibili
Categories
(Core :: Graphics: Text, defect, P3)
Core
Graphics: Text
Tracking
()
RESOLVED
INACTIVE
People
(Reporter: xidorn, Unassigned)
References
(Depends on 1 open bug)
Details
(Keywords: perf, Whiteboard: [country-cn])
Attachments
(1 file)
4.68 KB,
text/plain
|
Details |
Steps to reproduce: 1. visit http://www.bilibili.com/video/av105005/ 2. if you see a white dialog titled "HTML5播放器公测公告" (HTML5 Player Beta Announcement), check the checkbox before "默认使用HTML5播放器" (Use HTML5 player by default), and click the blue button "朕知道了" (I know). 3. you can see three buttons on the right side of the page aligned to the video area vertically, the first starts with "HTML5", and the second starts with "Flash". click the "HTML5" one. 4. when the video area shows any picture, click the progress bar to jump to 04:20, and wait for 5s. Expected result: The text over the video should move smoothly. Actual result: The whole page is frozen for several seconds, including the time on the progress bar. As a background, Bilibili is a famous Chinese video sharing website featuring anime-related videos. Danmaku means piece of text floating with the video playing.
Reporter | ||
Comment 1•8 years ago
|
||
This is a performance profile: https://cleopatra.io/#report=037dd5ce84c2db4faadd92b3d6571f5669c06eb4&filter=%5B%7B%22type%22%3A%22RangeSampleFilter%22,%22start%22%3A63288,%22end%22%3A66874%7D%5D&selection=0,4550,4551,4552,4553,4025,4554,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,219,220,221,222,255,256,257,258,4946,259,260,28,29,2567,2568,357,44,45,46,49,1107,4559,4560,4561,4562,4563,4564,4565,4563,4566,4567,4563,4568,4569,4570,4571,4572,4573,4574,4575,4563,4576,4577,4578 As can be seen here, ~2/3 of time is spent on CanvasRenderingContext2D.storkeText(), and the other ~1/3 is spent on CanvasRenderingContext2D.fillText().
Reporter | ||
Comment 2•8 years ago
|
||
This is the info from about:support. It is on a MacBook Pro (Retina, 15-inch, Late 2013) with Mac OS X 10.10.5 installed.
Reporter | ||
Comment 3•8 years ago
|
||
Chrome doesn't have the same performance issue, so I suppose there is something we can improve.
Whiteboard: [country-cn]
Reporter | ||
Comment 4•8 years ago
|
||
Looking at the profiling report... We spend the majority of time blocking on mach_msg_trap?! Why's that...
Updated•8 years ago
|
Flags: needinfo?(aschen)
Comment 5•8 years ago
|
||
Ethan, per talk, pls help on further investigation and see how we can improve the experience on canvas stroking.
Assignee: nobody → ethlin
Status: NEW → ASSIGNED
Flags: needinfo?(aschen)
Updated•8 years ago
|
OS: Unspecified → All
Hardware: Unspecified → All
Comment 6•8 years ago
|
||
After some study, gecko seems to spend a lot of time on creating AdjustedTarget. I'll keep investigating.
Updated•8 years ago
|
Priority: -- → P3
Comment 7•8 years ago
|
||
Shadow effect takes lots of time. Sometimes Gecko doesn't use SkiaGL due to the limitation [1] of the size. I open bug 1319362 for changing the limitation. [1] https://hg.mozilla.org/mozilla-central/annotate/0534254e9a40b4bade2577c631fe4cfa0b5db41d/dom/canvas/CanvasRenderingContext2D.cpp#l1445
Comment 8•8 years ago
|
||
(In reply to Ethan Lin[:ethlin] from comment #7) > Shadow effect takes lots of time. Sometimes Gecko doesn't use SkiaGL due to > the limitation [1] of the size. I open bug 1319362 for changing the > limitation. > > [1] > https://hg.mozilla.org/mozilla-central/annotate/ > 0534254e9a40b4bade2577c631fe4cfa0b5db41d/dom/canvas/CanvasRenderingContext2D. > cpp#l1445 The patch in bug 1319362 improves about 30% performance of shadow effect rendering on this page. But the playback is still laggy comparing to chrome and the shadow effect still takes too much time.
Comment 9•8 years ago
|
||
Thanks, Ethan. So how is the fps after applying the patch in bug 1319362 ?
Comment 10•8 years ago
|
||
(In reply to Astley Chen [:astley] (UTC+8) from comment #9) > Thanks, Ethan. So how is the fps after applying the patch in bug 1319362 ? The fps various depending on the content. Normally the fps is 60 but sometimes it downgrades to 0 on my mbp. After the patch, it only downgrades to about 10fps for the same part of the video. I also added some code to measure the time spending on shadow effect. For the clip 4:20~4:30, originally we spend about 0.45 sec for shadow effects. After bug 1319362, shadow effects only cost about 0.02sec.
Updated•7 years ago
|
status-firefox55:
--- → affected
Comment 11•7 years ago
|
||
Mass wontfix for bugs affecting firefox 52.
Updated•4 years ago
|
Comment 12•3 years ago
|
||
Does this still reproduce? Could you get a new profile?
Flags: needinfo?(xidorn+moz)
Reporter | ||
Comment 13•3 years ago
|
||
There doesn't seem to be any problem now.
But I'm using a different machine, and I have enabled WebRender, just FYI.
Flags: needinfo?(xidorn+moz)
Comment 14•2 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:lsalzman, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee: demo99 → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(lsalzman)
Updated•2 years ago
|
Flags: needinfo?(lsalzman)
Updated•2 years ago
|
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•