tree: c722e3b3b5d02becac383f3e1a97b61e67fd92f4 [path history] [tgz]
  1. OWNERS
  2. README.md
  3. resource_scheduler.cc
  4. resource_scheduler.h
  5. resource_scheduler_client.cc
  6. resource_scheduler_client.h
  7. resource_scheduler_params_manager.cc
  8. resource_scheduler_params_manager.h
  9. resource_scheduler_params_manager_unittest.cc
  10. resource_scheduler_unittest.cc
services/network/resource_scheduler/README.md

Resource Scheduler

Resource scheduler controls the loading of the webpages by scheduling the order in which the HTTP requests are dispatched on the network. It ensures that the loading of lower priority resources (e.g., XHRs, images) does not slow down the loading of the higher priority resources (e.g., HTML, CSS, render blocking JavaScript) while ensuring the maximum usage of the available network resources.

Design

Resource scheduler creates one resource scheduler client is created per execution context (aka per-frame and service worker). This means that iframes get their own scheduler client. Each scheduler client controls the loading of the requests relevat in its context. At a high level, the scheduling logic does not dispatch low priority requests on the network if they are expected to contend for network resources with higher priority requests. This contention is estimated based on the count of higher priority requests in-flight and the estimated network capacity.