|
|
Chromium Code Reviews|
Created:
4 years, 1 month ago by fukino Modified:
4 years, 1 month ago Reviewers:
oka CC:
chromium-reviews, oka+watch_chromium.org, rginda+watch_chromium.org, mtomasz+watch_chromium.org, yamaguchi+watch_chromium.org, fukino+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAudio player: Throttle concurrent loading of audio metadata.
When the audio player is opened, it starts loading audio metadata of all files
in the same directory.
This can result in running out of the limit for open file descriptors.
This CL throttles the metadata loading, limiting the number of open files up to 25.
BUG=654769
TEST=manually tested on a folder which has 1500 mp3 files (took 30 seconds to load all metadata on chell).
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Committed: https://crrev.com/f0c44416f9a7bd9328b93456f7f88f5c26461269
Cr-Commit-Position: refs/heads/master@{#428329}
Patch Set 1 #
Total comments: 6
Patch Set 2 : Added a comment. #Messages
Total messages: 16 (6 generated)
Description was changed from ========== Audio player: Throttle concurrent loading of audio metadata. When the audio player is opened, it starts loading audio metadata of all files in the same directory. This can result in running out of the limit for open file descriptors. This CL throttles the metadata loading, limiting the number of open files up to 25. BUG=654769 TEST=manually tested on a folder which has 1500 mp3 files. ========== to ========== Audio player: Throttle concurrent loading of audio metadata. When the audio player is opened, it starts loading audio metadata of all files in the same directory. This can result in running out of the limit for open file descriptors. This CL throttles the metadata loading, limiting the number of open files up to 25. BUG=654769 TEST=manually tested on a folder which has 1500 mp3 files. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
fukino@chromium.org changed reviewers: + oka@chromium.org
https://codereview.chromium.org/2456153002/diff/1/ui/file_manager/audio_playe... File ui/file_manager/audio_player/js/audio_player.js (right): https://codereview.chromium.org/2456153002/diff/1/ui/file_manager/audio_playe... ui/file_manager/audio_player/js/audio_player.js:54: this.loadMetadataQueue_ = new AsyncUtil.ConcurrentQueue(25); Could you explain why 25 is chosen? https://codereview.chromium.org/2456153002/diff/1/ui/file_manager/audio_playe... ui/file_manager/audio_player/js/audio_player.js:225: this.loadMetadataQueue_.run(function(trackIndex, callback) { fetchMetadata_ looks like more appropriate place to have throttle.
https://codereview.chromium.org/2456153002/diff/1/ui/file_manager/audio_playe... File ui/file_manager/audio_player/js/audio_player.js (right): https://codereview.chromium.org/2456153002/diff/1/ui/file_manager/audio_playe... ui/file_manager/audio_player/js/audio_player.js:230: }.bind(this, track)); I wonder if binding |track| is needed. Can't you use |track| from the closure?
https://codereview.chromium.org/2456153002/diff/1/ui/file_manager/audio_playe... File ui/file_manager/audio_player/js/audio_player.js (right): https://codereview.chromium.org/2456153002/diff/1/ui/file_manager/audio_playe... ui/file_manager/audio_player/js/audio_player.js:54: this.loadMetadataQueue_ = new AsyncUtil.ConcurrentQueue(25); On 2016/10/28 07:10:18, oka wrote: > Could you explain why 25 is chosen? I elaborated it a bit more. https://codereview.chromium.org/2456153002/diff/1/ui/file_manager/audio_playe... ui/file_manager/audio_player/js/audio_player.js:225: this.loadMetadataQueue_.run(function(trackIndex, callback) { On 2016/10/28 07:10:18, oka wrote: > fetchMetadata_ looks like more appropriate place to have throttle. I think loadMetadata_ is better. We want to throttle the initial bulk metadata load, but when a user changed the current track, loading metadata for the current track should be done before we completely finish the bulk load. (For example, when there are 1000 tracks in a directory and the user click "Prev" button after the audio player is opened, the last song will be selected and we want to show the metadata asap.) https://codereview.chromium.org/2456153002/diff/1/ui/file_manager/audio_playe... ui/file_manager/audio_player/js/audio_player.js:230: }.bind(this, track)); On 2016/10/28 07:13:43, oka wrote: > I wonder if binding |track| is needed. > Can't you use |track| from the closure? You're right. Thanks!
lgtm
On 2016/10/28 09:39:48, oka wrote: > lgtm Could you add how long it took on TEST?
Description was changed from ========== Audio player: Throttle concurrent loading of audio metadata. When the audio player is opened, it starts loading audio metadata of all files in the same directory. This can result in running out of the limit for open file descriptors. This CL throttles the metadata loading, limiting the number of open files up to 25. BUG=654769 TEST=manually tested on a folder which has 1500 mp3 files. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Audio player: Throttle concurrent loading of audio metadata. When the audio player is opened, it starts loading audio metadata of all files in the same directory. This can result in running out of the limit for open file descriptors. This CL throttles the metadata loading, limiting the number of open files up to 25. BUG=654769 TEST=manually tested on a folder which has 1500 mp3 files (took 30 seconds to load all metadata on chell). CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
Thanks! > Could you add how long it took on TEST? Done
The CQ bit was checked by fukino@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Audio player: Throttle concurrent loading of audio metadata. When the audio player is opened, it starts loading audio metadata of all files in the same directory. This can result in running out of the limit for open file descriptors. This CL throttles the metadata loading, limiting the number of open files up to 25. BUG=654769 TEST=manually tested on a folder which has 1500 mp3 files (took 30 seconds to load all metadata on chell). CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Audio player: Throttle concurrent loading of audio metadata. When the audio player is opened, it starts loading audio metadata of all files in the same directory. This can result in running out of the limit for open file descriptors. This CL throttles the metadata loading, limiting the number of open files up to 25. BUG=654769 TEST=manually tested on a folder which has 1500 mp3 files (took 30 seconds to load all metadata on chell). CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Audio player: Throttle concurrent loading of audio metadata. When the audio player is opened, it starts loading audio metadata of all files in the same directory. This can result in running out of the limit for open file descriptors. This CL throttles the metadata loading, limiting the number of open files up to 25. BUG=654769 TEST=manually tested on a folder which has 1500 mp3 files (took 30 seconds to load all metadata on chell). CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Audio player: Throttle concurrent loading of audio metadata. When the audio player is opened, it starts loading audio metadata of all files in the same directory. This can result in running out of the limit for open file descriptors. This CL throttles the metadata loading, limiting the number of open files up to 25. BUG=654769 TEST=manually tested on a folder which has 1500 mp3 files (took 30 seconds to load all metadata on chell). CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/f0c44416f9a7bd9328b93456f7f88f5c26461269 Cr-Commit-Position: refs/heads/master@{#428329} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/f0c44416f9a7bd9328b93456f7f88f5c26461269 Cr-Commit-Position: refs/heads/master@{#428329} |
