New issue
Advanced search Search tips

Issue 758010 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug


Participants' hotlists:
Downloads-Framework-Service


Sign in to add a comment

Download service: Yield resource on user navigation events.

Project Member Reported by xingliu@chromium.org, Aug 22 2017

Issue description

Currently in download service, we pause scheduled downloads if there is user initiated downloads.

But there is also other performance concerns, like we shouldn't impact user navigation, or other kind of heavy lifted user initiated network activity.

In short term, we may listen to navigation events and pause downloads accordingly if user is navigating. After navigation events, we can wait for a configurable back off time to resume these downloads.

Other heavy weight network usage might be streaming videos or other server fetch logic. 

 
 
Owner: xingliu@chromium.org
Summary: Download service: Yield resource on user navigation events. (was: Download service: yield resource on user navigation events.)
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7

commit d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7
Author: Xing Liu <xingliu@chromium.org>
Date: Tue Sep 05 21:20:18 2017

Download service: Propagate navigation events to download service.

Listen to navigation events from WebContentsObserver. Logic in
controller will be implemented by other CL.

DownloadNavigationObserver is WebContentsObserver, its life cycle is
tied to a WebContents.

NavigationMonitor is the glue layer between WebContents and download
service. Its life cycle is unrelated to download systems.

Bug:  758010 
Change-Id: I512aec018d82d3fc9ffb4770545e706a930715b9
Reviewed-on: https://chromium-review.googlesource.com/633709
Reviewed-by: Shakti Sahu <shaktisahu@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Elliot Glaysher <erg@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499751}
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/chrome/browser/ui/tab_helpers.cc
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/components_unittests.filter
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/content/DEPS
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/content/factory/BUILD.gn
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/content/factory/download_service_factory.cc
[add] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/content/factory/navigation_monitor_factory.cc
[add] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/content/factory/navigation_monitor_factory.h
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/content/public/BUILD.gn
[add] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/content/public/download_navigation_observer.cc
[add] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/content/public/download_navigation_observer.h
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/internal/BUILD.gn
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/internal/controller_impl.cc
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/internal/controller_impl.h
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/internal/controller_impl_unittest.cc
[add] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/internal/navigation_monitor_impl.cc
[add] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/internal/navigation_monitor_impl.h
[add] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/internal/navigation_monitor_impl_unittests.cc
[modify] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/public/BUILD.gn
[add] https://crrev.com/d391b6e1e62a6c0da4fd99b22e3d5d5f7503a8a7/components/download/public/navigation_monitor.h

Status: Fixed (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e2234b606130e1b80b7f6acf431fc5c2b8b8f454

commit e2234b606130e1b80b7f6acf431fc5c2b8b8f454
Author: Shakti Sahu <shaktisahu@chromium.org>
Date: Mon Sep 25 19:43:27 2017

Download service : Pause low priority downloads on navigation

In order to not have impact on chrome performance, download service
should pause any normal/low priority downloads in the event of an
active navigation in Chrome. We should also wait for a delay after the
last navigation finished before we could resume those paused downloads.

The exception are those downloads that are not resumable i.e.
if 'accept-range' header is false/absent, in that case we should
let them continue.

Bug:  758010 
Change-Id: Ia71dc7cd012c7da5f350afc4e85f612e769b5203
Reviewed-on: https://chromium-review.googlesource.com/636288
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504135}
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/content/internal/download_driver_impl.cc
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/internal/config.cc
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/internal/config.h
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/internal/controller_impl.cc
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/internal/controller_impl.h
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/internal/driver_entry.cc
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/internal/driver_entry.h
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/internal/navigation_monitor_impl.cc
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/internal/navigation_monitor_impl.h
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/internal/navigation_monitor_impl_unittests.cc
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/internal/stats.cc
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/internal/stats.h
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/public/download_params.h
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/components/download/public/navigation_monitor.h
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/e2234b606130e1b80b7f6acf431fc5c2b8b8f454/tools/metrics/histograms/histograms.xml

Sign in to add a comment