Last modified: 2014-06-23 16:07:00 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 T51528, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49528 - MediaWiki tries to create a thumbnail multiple times although that is not needed
MediaWiki tries to create a thumbnail multiple times although that is not needed
Status: NEW
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.21.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
: performance
Depends on:
Blocks: 41371
  Show dependency treegraph
 
Reported: 2013-06-13 13:56 UTC by Joerg
Modified: 2014-06-23 16:07 UTC (History)
0 users

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


Attachments

Description Joerg 2013-06-13 13:56:31 UTC
From http://www.mediawiki.org/wiki/Thread:Project:Support_desk/Why_does_MediaWiki_try_to_create_the_same_thumbnail_multiple_times%3F


During one single request, MediaWiki tries to create one and the same thumbnail multiple times. This error happens, when it is not actually needed at all to create a thumbnail.


<b>How to reproduce:</b>

Create a page with this wiki text: 
[[File:Image.png]]

Image.png must have a size, which can be rendered without any resizing. E.g. in my case it has 450x151 pixels.

<b>Actual result:</b>

When viewing the uncached page, MediaWiki <i>several times</i> tries to create a thumbnail with exactly the size of the original image.

Debug output:

<pre>
Start request GET /Main_Page
...
Pulling file metadata from cache key wiki:file:8866e45e917553a7dbb1198218cfa928
MimeMagic::__construct: loading mime types from /www/wiki/includes/mime.types
MimeMagic::__construct: loading mime info from /www/wiki/includes/mime.info

File::transform: Doing stat for mwstore://local-backend/local-thumb/8/88/Image.png/450px-Image.png
FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/8/88/Image.png/450px-Image.png does not exist.
BitmapHandler::doTransform: creating 450x151 thumbnail at /tmp//transform_64c4649d3b12-1.png using scaler im
BitmapHandler::doTransform: returning unscaled image

File::transform: Doing stat for mwstore://local-backend/local-thumb/8/88/Image.png/450px-Image.png
BitmapHandler::doTransform: creating 450x151 thumbnail at /tmp//transform_40e462b65414-1.png using scaler im
BitmapHandler::doTransform: returning unscaled image

File::transform: Doing stat for mwstore://local-backend/local-thumb/8/88/Image.png/450px-Image.png
BitmapHandler::doTransform: creating 450x151 thumbnail at /tmp//transform_341bb62f6727-1.png using scaler im
BitmapHandler::doTransform: returning unscaled image
</pre>

<b>Expected result:</b>

1. MediaWiki should recognize that it is not necessary to create a thumbnail in this size, as the thumbnail would have exactly the size of the original image.
2. MediaWiki should only try to create the thumbnail ONE time, not three times.

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


Navigation
Links