Closed Bug 1801608 Opened 1 year ago Closed 1 year ago

Priorize early hint preload as preload

Categories

(Core :: Networking: HTTP, task, P2)

task

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: manuel, Assigned: manuel)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

cos->AddClassFlags(nsIClassOfService::Unblocked); is called in Fetchpreloader. Should be done in EarlyHintPreloader as well.

https://searchfox.org/mozilla-central/rev/83b86005c6913c2062419efb8aabdf2e683aa47f/uriloader/preload/FetchPreloader.cpp#164-169

// static
void FetchPreloader::PrioritizeAsPreload(nsIChannel* aChannel) {
  if (nsCOMPtr<nsIClassOfService> cos = do_QueryInterface(aChannel)) {
    cos->AddClassFlags(nsIClassOfService::Unblocked);
  }
}

Also:
https://searchfox.org/mozilla-central/rev/83b86005c6913c2062419efb8aabdf2e683aa47f/uriloader/preload/PreloaderBase.cpp#118-123

// static
void PreloaderBase::AddLoadBackgroundFlag(nsIChannel* aChannel) {
  nsLoadFlags loadFlags;
  aChannel->GetLoadFlags(&loadFlags);
  aChannel->SetLoadFlags(loadFlags | nsIRequest::LOAD_BACKGROUND);
}

We might want to prioritize the different asset types differently?

  • css > (or: ==/<) font > javascript > images?
Assignee: nobody → manuel
Status: NEW → ASSIGNED
Pushed by mbucher@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/781cf9405c2a
Early Hints: Depriorize preload channel to unblocked background load r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: