Last modified: 2014-07-01 13:00:24 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 T69359, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67359 - MultimediaViewer: In overlay viewer, shrinking window makes 4 requests for large images
MultimediaViewer: In overlay viewer, shrinking window makes 4 requests for la...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
MultimediaViewer (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: performance
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-01 12:57 UTC by Krinkle
Modified: 2014-07-01 13:00 UTC (History)
4 users (show)

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


Attachments

Description Krinkle 2014-07-01 12:57:48 UTC
After having already loaded the full screen viewer (not the HTML 5 OS-level full screen, but just page filling overlay), shrinking the browser window fires off 4 http requests. Say the current window size requested 1280px width and I narrow the window to about 800px wide

* Current image at 1024px (XHR)
* Current image at 1024px (Image)
* Some image I previously viewed at 1024px (XHR)
* Some image I previously viewed at 1024px (Image)

Imho shrinking the window shouldn't fire off any http requests. The browser is good enough at scaling (especially with HiDPI in mind). Certainly not worth it when just adjusting the screen a little. But either way, if you really want to, just fetch one :)

Steps:
0. In Chrome (35; stable), 1440x900px Retina display, browser window maximised.
1. Open https://commons.wikimedia.org/wiki/Category:Carla_Bruni
2. Click "Nicolas Sarkozy and Carla (..) Obama.jpg".
3. Close it, and click "Michelle (..) G20 leaders tour.jpg".
4. Open Dev Tools (pop out), focus Network, clear current log.
5. Resize window to about half the width

Expected:

No network activity

Actual:

1)
1280px-Michelle_Obama_and_the_spouses_of_the_G20_leaders.jpg
upload.wikimedia.org/wikipedia/commons

GET  200 image/jpeg  185 KB  63 ms
     OK  XHR         185 KB  16 ms
Request:
- Accept:*/*
- Cookie:
Response:
- Age:14399

2)
1280px-Michelle_Obama_and_the_spouses_of_the_G20_leaders.jpg
upload.wikimedia.org/wikipedia/commons

GET  200 image/jpeg  185 KB  61 ms
     OK  Images      185 KB  11 ms
Request:
- Accept:image/webp,*/*;q=0.8
- Cookie:GeoIP=*******::*******:v4
Response:
- Age:14400

3)
1280px-Nicolas_Sarkozy_and_Carla_Bruni_welcomes_by_Michelle_and_Barack_Obama.jpg
upload.wikimedia.org/wikipedia/commons

GET  200  image/jpeg  191 KB  56 ms
     OK   XHR         191 KB  14 ms
Request:
- Accept:*/*
- Cookie:
Response:
- Age:13063

4)
1280px-Nicolas_Sarkozy_and_Carla_Bruni_welcomes_by_Michelle_and_Barack_Obama.jpg
upload.wikimedia.org/wikipedia/commons

GET  200  image/jpeg  191 KB  40 ms
     OK   Images       191 KB  11 ms
Request:
- Accept:image/webp,*/*;q=0.8
- Cookie:GeoIP=*******::*******:v4
Response:
- Age:13063
Comment 1 Krinkle 2014-07-01 13:00:24 UTC
Sometimes I actually get 6, not 4.

If I made the window larger anywhere in between, it will re-request the old image at the large size first as well.

Which requests:

1) 1920px- image prev (XHR)
2) 1920px- image prev (Image)
3) 1280px- image curr (XHR)
4) 1280px- image curr (Image)
5) 1280px- image prev (XHR)
6) 1280px- image prev (Image)

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


Navigation
Links