Last modified: 2014-04-19 14:46:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58695, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56695 - Display images faster in Media Viewer
Display images faster in Media Viewer
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
MultimediaViewer (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
: performance
: 57325 58290 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-06 22:28 UTC by Fabrice Florin
Modified: 2014-04-19 14:46 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Fabrice Florin 2013-11-06 22:28:39 UTC
Right now, it can take several seconds to display images in the Media Viewer, because we're asking the server to resize the image at a custom size.

To speed up this image display, we will try to fetch the thumbnail size that is closest to 100% of the screen width but no more than 90% of the screen height (instead of asking the server to pre-render custom sizes, which is too time-consuming). 

We would also start displaying the image as soon as it is available, without waiting for the meta-data to be loaded.
Comment 1 Bawolff (Brian Wolff) 2013-11-06 22:48:02 UTC
One could maybe preload the small image (scaled large by the browser) to give something for the user to look at well the big image is loaded.
Comment 2 Bryan Davis 2013-11-06 23:30:37 UTC
(In reply to comment #1)
> One could maybe preload the small image (scaled large by the browser) to give
> something for the user to look at well the big image is loaded.

That's actually not a horrible idea. It would be a little like the olden days of progressive jpeg images. You could take the thumb that is already inline in the page and stretch it out to the new size as a placeholder while the larger image is fetched.
Comment 3 Brion Vibber 2013-11-07 19:36:53 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > One could maybe preload the small image (scaled large by the browser) to give
> > something for the user to look at well the big image is loaded.
> 
> That's actually not a horrible idea. It would be a little like the olden days
> of progressive jpeg images. You could take the thumb that is already inline
> in
> the page and stretch it out to the new size as a placeholder while the larger
> image is fetched.

+1 I endorse this approach. Same technique can be used when resizing the window (or switching orientation on a tablet or mobile showing the desktop-mode site), if you find it's best to fetch a new full-size image for the new window size.

It should be fairly straightforward to nab the src property from the thumbnail, and since the resource is cached it'll display immediately... Then use an offscreen image element (you can just create it in JS, no need to add to the document) and wait for its onload (or onerror!) to fire before updating the visible image with the full-size src.

Don't forget to show a spinner on top of the temporary image. :)
Comment 4 Gerrit Notification Bot 2013-11-13 21:48:55 UTC
Change 95282 had a related patch set uploaded by MarkTraceur:
Introduce image size bucketing

https://gerrit.wikimedia.org/r/95282
Comment 5 Mark Holmquist 2013-11-20 22:44:44 UTC
*** Bug 57325 has been marked as a duplicate of this bug. ***
Comment 6 Mark Holmquist 2013-12-10 22:01:35 UTC
*** Bug 58290 has been marked as a duplicate of this bug. ***
Comment 7 Gerrit Notification Bot 2013-12-30 18:19:50 UTC
Change 95282 merged by jenkins-bot:
Introduce image size bucketing

https://gerrit.wikimedia.org/r/95282
Comment 8 Mark Holmquist 2014-01-10 18:33:15 UTC
Insofar as we are *able* to fix this bug in MMV, this is fixed.

If you want to talk about the thumbnail pipeline needing to be faster, please file a bug against core.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links