Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

imagemodels.py line 194 opens a thumb/image file on every (non admin) rendering request #105

Open
katzlbt opened this Issue · 0 comments

1 participant

Dr. Thomas
Dr. Thomas

imagemodels.py line 194 (using the self.file.file property) makes easy_thumbnails open an image file on the disk that is never used. The file-open is executed every time a template is rendered, draining performance (especially on slow storages). See http://github.com/SmileyChris/easy-thumbnails/issues/293

"website/cmslibs/filer/models/imagemodels.py", line 194, in easy_thumbnails_thumbnailer
file=self.file.file, name=self.file.name,

Stacktrace:

"website/cmslibs/easy_thumbnails/templatetags/thumbnail.py", line 103, in render
thumbnail = get_thumbnailer(source).get_thumbnail(opts)
"website/cmslibs/easy_thumbnails/files.py", line 46, in get_thumbnailer
if hasattr(obj, \'easy_thumbnails_thumbnailer\'):
"website/cmslibs/filer/models/imagemodels.py", line 194, in easy_thumbnails_thumbnailer
file=self.file.file, name=self.file.name,
"/base/data/home/runtimes/python27/python27_lib/versions/third_party/django-1.5/django/db/models/fields/files.py", line 46, in getfile
self.file = self.storage.open(self.name, \'rb\')
"/base/data/home/runtimes/python27/python27lib/versions/third_party/django-1.5/django/core/files/storage.py", line 36, in open
return self._open(name, mode)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.