#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
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

 * has_patch:  1 => 0
 * needs_better_patch:  1 => 0
 * resolution:   => fixed
 * status:  new => closed

Comment:

 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:24>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018f9a58f147-afab4583-defc-49ac-bdbe-84a4c1641e0e-000000%40eu-central-1.amazonses.com.

Reply via email to