Closed Bug 1312745 Opened 8 years ago Closed 8 years ago

New API to mark network loads as 'throttle-able' and 'urgent-start'

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: mayhemer, Assigned: amchung)

References

Details

(Whiteboard: [necko-active])

Attachments

(1 file, 1 obsolete file)

Seems like modifying (extending) the existing nsISupportsPriority interface is not the best way, its a general thing.  Keeping flags in the priority value is also not a good idea, since priority can be added/subtracted or completely replaced.

Hence, let's add a new interface, nsINetworkLoadPriority (: nsISupportsPriority) with:

attribute boolean throttleable
attribute boolean urgentStart

implementer: HttpChannelBase

The first attr annotates the channel as allowed to be throttled on page load pressure.  Applies to downloads and updates.

The second attr annotates the channel as slot "A" type (see the URL).  It means to go out as soon as possible with priority as the very first among all other channels, regardless any other priorities.  Applies to video play, image zoom, and maybe downloads.
Blocks: 1312754
Blocks: 1312774
Whiteboard: [necko-next]
I think this reduces to just add new flags to the existing nsIClassOfService interface.  Like 'Throttleable = 1 << 5' and 'UrgentStart = 1 << 6'.

Amy, would you be willing to take this bug?
Assignee: nobody → amchung
Whiteboard: [necko-next] → [necko-active]
Ok, I will take a look at this big.
Hi Honza,
Do I only need to add the 'Throttleable = 1 << 5' and 'UrgentStart = 1 << 6' in nsIClassOfService interface?
If we decide to implement all functions including to set class flags and priority, do we have to open new bug for implement?

Thanks!
Flags: needinfo?(honzab.moz)
(In reply to Amy Chung [:Amy] from comment #3)
> Hi Honza,
> Do I only need to add the 'Throttleable = 1 << 5' and 'UrgentStart = 1 << 6'
> in nsIClassOfService interface?

Yes, I think this bug is eventually that trivial.

> If we decide to implement all functions including to set class flags and
> priority, do we have to open new bug for implement?

Not sure what you mean exactly, but I think no.  These flags will be used in other bugs, listed in the "Blocks" list.  I originally though this bug would be more complicated, but it really is reduced to just add the flags.  I don't thing more changes are needed.  Only make sure it builds.

> 
> Thanks!

Me too :)
Flags: needinfo?(honzab.moz)
Hi Honza,
I have added Throttleable & UrgentStart in nsIClassOfService interface.
Please help me to review my patch.

Thanks!
Attachment #8808962 - Flags: review?(honzab.moz)
Blocks: 1316358
Comment on attachment 8808962 [details] [diff] [review]
Added class flags in nsIClassOfService interface.

Review of attachment 8808962 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!  Yes, this is it.
Attachment #8808962 - Flags: review?(honzab.moz) → review+
(In reply to Honza Bambas (:mayhemer) from comment #6)
> Comment on attachment 8808962 [details] [diff] [review]
> Added class flags in nsIClassOfService interface.
> 
> Review of attachment 8808962 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Thanks!  Yes, this is it.

Thanks your help!
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9fff773417e1
Add class flags in nsIClassOfService interface. r=mayhemer
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9fff773417e1
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: