New issue
Advanced search Search tips

Issue 916878 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 20
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Quick view metadata box can get stuck in an infinite loop getting directory sizes

Project Member Reported by sa...@chromium.org, Dec 20

Issue description

Chrome Version: r617029
OS: ChromeOS

What steps will reproduce the problem?
(1) Open quickview
(2) Change the currently selected directory quickly
(3) Observe CPU usage of the Files app renderer

What is the expected result?
Directory sizes are fetched at most once per directory selection.
Low renderer CPU usage.

What happens instead?
Files app repeatedly requests the directory size.
40% renderer CPU usage.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 20

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

commit 786216610ef0db65a13eb8cb6c449e2773448204
Author: Sam McNally <sammc@chromium.org>
Date: Thu Dec 20 04:20:50 2018

Only calculate a directory size once for the quickview metadata box.

MetadataBoxController.setDirectorySize_() only permits one operation to
calculate directory size at a time. If an operation is in progress, the
new operation is queued by storing a closure in onDirectorySizeLoaded_.
When the in-progress operation completes, that closure is invoked,
calling setDirectorySize_() again with the last queued arguments. When
that completes, it calls that same closure again, and again and again.

Clear onDirectorySizeLoaded_ after scheduling its invocation.

Bug:  916878 
Change-Id: Ic79c93964ef34cdcb695e892a3fde6014dd1a14d
Reviewed-on: https://chromium-review.googlesource.com/c/1385691
Reviewed-by: Noel Gordon <noel@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618107}
[modify] https://crrev.com/786216610ef0db65a13eb8cb6c449e2773448204/ui/file_manager/file_manager/foreground/js/metadata_box_controller.js

Status: Fixed (was: Started)

Sign in to add a comment