Open
Bug 1125713
Opened 10 years ago
Updated 2 years ago
Browser API: Add event for page download progress
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox38 | --- | fixed |
People
(Reporter: paul, Unassigned)
References
Details
(Keywords: dev-doc-needed, perf)
Attachments
(3 files, 1 obsolete file)
6.00 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
12.16 KB,
text/plain
|
Details | |
5.95 KB,
patch
|
Details | Diff | Splinter Review |
Today, the browser API only tells if a frame is loading or not. It makes it impossible to build a progress bar.
Having something like `onProgressChange(CurTotalProgress,MaxTotalProgress)` from nsIWebProgressListener would probably work.
Updated•10 years ago
|
Blocks: browser-api
Comment 1•10 years ago
|
||
There's semi-related discussion in https://github.com/whatwg/fetch/issues/19, too.
Comment 2•10 years ago
|
||
This patch adds loadprogresschanged event.
Attachment #8564753 -
Flags: review?(fabrice)
Updated•10 years ago
|
Attachment #8564753 -
Flags: review?(fabrice) → review+
Updated•10 years ago
|
Keywords: dev-doc-needed
Comment 3•10 years ago
|
||
Reporter | ||
Comment 4•10 years ago
|
||
Results are not very satisfying. Pretty often, the max value is lower than the current value. Sometimes the max value is 10 times smaller than the current value.
Not sure what we can do about it.
Comment 5•10 years ago
|
||
Assignee: nobody → amarchesini
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Comment 6•10 years ago
|
||
This makes chorme process main thread quite busy when launch an app on FxOS and delay sync IPCs from child. Do we need this event all the time?
Reporter | ||
Comment 7•10 years ago
|
||
We actually need only the first download progress event to indicate download has started.
Comment 8•10 years ago
|
||
I have tried to gather visuallyLoaded event of launching SMS on my Flame [1], with and without the path here:
AVG MED MIN MAX STD
With the patch 1642.380661 1620.661354 1528.798750 1822.307707 99.2765441
Without the patch 1355.260708 1363.919010 1234.469479 1515.148748 85.04832144
It's ~300ms regression. Can we back this out and revise the patch if we need only the first download progress event?
Version:
Gaia: c4835abe080b20aaec6e736ad6f4a74c444c244c
Gecko: https://hg.mozilla.org/mozilla-central/rev/fd8e079d6335
Device:
Flame 1024MB v18D
Test steps:
1. Launch SMS with empty load
2. Kill the app
3. Wait for 5s, go to 1
4. Repeat 1-3 for 10 times
Updated•10 years ago
|
Flags: needinfo?(amarchesini)
Comment 9•10 years ago
|
||
Ting-Yu, please backout.
Comment 10•10 years ago
|
||
I couldn't find a backout flag, how should I request that?
Flags: needinfo?(amarchesini)
Comment 11•10 years ago
|
||
(In reply to Ting-Yu Chou [:ting] from comment #10)
> I couldn't find a backout flag, how should I request that?
There's no flag, just do it yourself.
Comment 12•10 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #11)
> (In reply to Ting-Yu Chou [:ting] from comment #10)
> > I couldn't find a backout flag, how should I request that?
>
> There's no flag, just do it yourself.
I have only level 1 access...
Comment 13•10 years ago
|
||
Updated•10 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•10 years ago
|
tracking-b2g:
--- → backlog
Keywords: perf
Comment 14•10 years ago
|
||
(In reply to Paul Rouget [:paul] from comment #7)
> We actually need only the first download progress event to indicate download
> has started.
Well... can you use mozbrowserloadstart for that?
Flags: needinfo?(paul)
Reporter | ||
Comment 15•10 years ago
|
||
(In reply to Andrea Marchesini (:baku) from comment #14)
> (In reply to Paul Rouget [:paul] from comment #7)
> > We actually need only the first download progress event to indicate download
> > has started.
>
> Well... can you use mozbrowserloadstart for that?
We want to do something similar to what Firefox does: indicate when load starts (reaching the server, grey throbber), indicate when the server responded (starting downloading, blue throbber).
So mozbrowserloadstart is not enough.
Flags: needinfo?(paul)
Reporter | ||
Comment 16•9 years ago
|
||
I've updated the patch to only send an event (mozbrowserconnected) once the server has been reached. The goal is to be able to differentiate the phase when the browser is connecting to the server and the phase when the browser is downloading and loading the page.
Reporter | ||
Comment 17•9 years ago
|
||
Assignee: amarchesini → paul
Attachment #8644239 -
Attachment is obsolete: true
Status: REOPENED → ASSIGNED
Reporter | ||
Comment 18•9 years ago
|
||
This still sends multiple "connected" event. We should send only one.
Reporter | ||
Comment 19•9 years ago
|
||
For Servo, we are planning to fire a "mozbrowserconnected" event once the server has been reached.
Reporter | ||
Comment 20•9 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Comment 21•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: paul → nobody
Status: ASSIGNED → NEW
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•