#8307: ImageFile use of width_field and height_field is slow with remote storage
backends
-------------------------------------+-------------------------------------
     Reporter:  sebastian.serrano@…  |                    Owner:  Jacob
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  File                 |                  Version:  dev
  uploads/storage                    |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:  imagefile height     |             Triage Stage:  Accepted
  width                              |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by john-parton):

 I think it's very important that they provide a minimal test.

 Based on my research, I do not think the scenario they are describing is
 actually a problem anymore, and had been fixed sometime in the last twelve
 years by another change.

 I could be wrong, of course, but without actual code to pore over, my gut
 says it's fixed.

 Replying to [comment:24 Sarah Boyce]:
 > Replying to [comment:18 Alan Justino da Silva]:
 > > That said, I do not see how this solution fixes a template page
 rendering ~10 images from a remote storage as there is no `.save()`
 involved for ''using existing images'':
 > >
 > > When I reopened the issue, my application needed only the URL of the
 files, already stored in the database, thus a O(1) call to DB. That is
 because I needed not to put height and width in the `<img />` HTML tag, as
 the browser deals with whatever it fetches from the URL. If grabbing the
 URL keeps forcing to `.get_image_dimentions()`, then this call becomes
 O(10) calls to the storage, meaning O(10) HTTP HEAD calls to S3. That is
 why I proposed ''the storage'' to decide if this should be done, or
 cached, or faked.
 >
 > Hi Alan, the issue you are describing was fixed in #34517.
 > I will close this issue and reopen #35139 as this is a separate concern.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/8307#comment:25>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018f9c4e5a70-97161f98-f967-4c42-a9be-6a5f682af5e0-000000%40eu-central-1.amazonses.com.

Reply via email to