https://bugzilla.wikimedia.org/show_bug.cgi?id=67359

            Bug ID: 67359
           Summary: MultimediaViewer: In overlay viewer, shrinking window
                    makes 4 requests for large images
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Keywords: performance
          Severity: normal
          Priority: Unprioritized
         Component: MultimediaViewer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
       Web browser: ---
   Mobile Platform: ---

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to