New issue
Advanced search Search tips

Issue 850990 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Throttle download_db_impl updates

Project Member Reported by qin...@chromium.org, Jun 8 2018

Issue description

DownloadDBImpl is updated on every downloadItem::OnDownloadUpdated().
This is quite costly as it involves file write.

We need to throttle the number of writes to disk.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 22 2018

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

commit c8592cc3e490b01c0f0e84a7c7a0b5bf5db02f46
Author: Min Qin <qinmin@chromium.org>
Date: Fri Jun 22 19:37:08 2018

Throttle DownloadDB updates

This CL stops DownloadDBCache to immediately updating the DB.
Instead, it caches the change and only update the DB when timer fires.
Some of the updates are considered high priority and will thus
flush to DB immediately.

Bug:  850990 
Change-Id: I124ac1c69e5c7e6bd609d656be3ac1a938f78c63
Reviewed-on: https://chromium-review.googlesource.com/1102084
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569736}
[modify] https://crrev.com/c8592cc3e490b01c0f0e84a7c7a0b5bf5db02f46/components/download/database/download_db.h
[modify] https://crrev.com/c8592cc3e490b01c0f0e84a7c7a0b5bf5db02f46/components/download/database/download_db_impl.cc
[modify] https://crrev.com/c8592cc3e490b01c0f0e84a7c7a0b5bf5db02f46/components/download/database/download_db_impl.h
[modify] https://crrev.com/c8592cc3e490b01c0f0e84a7c7a0b5bf5db02f46/components/download/internal/common/download_db_cache.cc
[modify] https://crrev.com/c8592cc3e490b01c0f0e84a7c7a0b5bf5db02f46/components/download/internal/common/download_db_cache.h
[modify] https://crrev.com/c8592cc3e490b01c0f0e84a7c7a0b5bf5db02f46/components/download/internal/common/download_db_cache_unittest.cc

Comment 2 by qin...@chromium.org, Jun 22 2018

Status: Fixed (was: Assigned)

Sign in to add a comment