diff options
author | mtomasz@chromium.org <mtomasz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-21 07:23:47 +0000 |
---|---|---|
committer | mtomasz@chromium.org <mtomasz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-21 07:23:47 +0000 |
commit | 8937251d3fd50990d8879fbba0766d744d057c77 (patch) | |
tree | b7a86cb93c90292b391f82a30d25b5bbbae5098a /chrome/browser/resources/help_app | |
parent | fb9c50ddca2aee9b52e3bf91b742eeb5a51b2772 (diff) | |
download | chromium_src-8937251d3fd50990d8879fbba0766d744d057c77.zip chromium_src-8937251d3fd50990d8879fbba0766d744d057c77.tar.gz chromium_src-8937251d3fd50990d8879fbba0766d744d057c77.tar.bz2 |
Introduce a priority queue to the image loader.
Image loader used to start loading all requests at once, which caused long loading times in some scenarios. Eg. while images in the mosaic view are being loaded in the background, switching to the next image in the slide view is slow. It may happen that there are hundreds of pending images (for mosaic view preload) which have to be handled before the one is important (slide view).
To fix this issue (1) priorities were introduces, (2) tasks are queued, (3) number of tasks performed in parallel is limited to 5.
In practice, it gives a guarantee that there will be at most 5 tasks with lower priority executed before a task with higher priority. Taking into account an average resizing time, which is around 200ms, this gives a guarantee that on average, the image with the highest priority will be handled in the worst case with 1 second of delay.
Along the way, the selected images in the mosaic view have higher priority than other tiles. Also, background thumbnail generation for copying images has now very low priority to minimize load of important images.
TEST=Tested manually.
BUG=239237
Review URL: https://chromiumcodereview.appspot.com/14623021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201245 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/help_app')
0 files changed, 0 insertions, 0 deletions