I fully understand the convenience of being able to read just the header.
(it's ok if it doesn't go in the sources)
I'm wondering, could it be possible to adapt the loop to read bigger chunks
maybe.
Nevertheless, in my case, the 35 meg is a TIFF file, while a 10 meg file
that is also very slow is
I incorporated a good patch from ticket #6527 that cleaned up
HttpResponse.__init__, which I have spent a lot of time looking at
lately. This wasn't any of my work, but from my experience with
HttpResponse, it looks like a good idea (and it makes the code more
pleasant to look at).
HttpResponse
On Fri, Jul 17, 2009 at 4:27 PM, Javier Guerra wrote:
>
> On Fri, Jul 17, 2009 at 8:10 PM, Fredz./
> wrote:
> > I might be loading the image in memory, but it sure seems 1000x faster
> > when you reach images the size of 10 megs and more.
>
> this
On Fri, Jul 17, 2009 at 8:10 PM, Fredz./ wrote:
> I might be loading the image in memory, but it sure seems 1000x faster
> when you reach images the size of 10 megs and more.
this assumes that it would have to read the whole file anyway. some
formats have the size
Hi Sergio,
I might be loading the image in memory, but it sure seems 1000x faster
when you reach images the size of 10 megs and more.
The image is loaded in memory anyways in the
django.forms.fields.ImageField , isn't it ?
I'm wondering why the db.models.fields.files.ImageFieldFile.save
should
sorry, it's not the same bug...
looks like your code is removing protection of reading the file in chunks,
so you could load a huge image in the memory which is not a good idea at
all.
the best think to do is create a ticket[1].
Do you know how to use svn? if yes, the only step to generate a
Did you check the ticket #11158? The problem looks to be similar.
http://code.djangoproject.com/ticket/11158
--
Sergio Oliveira
If builders built buildings the way programmers wrote programs, then the
first woodpecker that came along would destroy civilization.
On Fri, Jul 17, 2009 at 20:41,
Here's some little benchmarks i've done.
Not very fancy benchmarks, but tests:
3.5 meg image:
(old code): fast
(new code) : fast
35 meg image:
(old code) : 1h30m or so.. (depending on the cpu, it could take
about 10 minutes on a good cpu)
(new code): 5-10 seconds (on the same old CPU
I have a model that has a ImageField, and I uploaded a sample image of
35 megs. This image will be used at different places and resized for
those different purposes.
I noticed that the django.core.files.images --> get_image_dimensions
seems to be slow.
It took more than an hour and a half to
Not a crazy week, I have been starting to work on a comprehensive set of
testing examples. Basically a simple blog type project with windmill, twill
and unittests. (Taking advantage of fixtures, test-only models and mock
request objects). Its not very far along, as most of my time has been spent
10 matches
Mail list logo