Hi,

I am working on a Gallery where I have am displaying about 30 Thumbnails 
(300x300, JPG). Since only logged in users should be able to see the 
Images, I am specifying a WSGI-Python script as img-src:

<img src="image.py?id=5">

It's working.. but it's incredible slow.
I can watch every thumbnail how it's loaded and displayed line-by-line..

To make sure it's not because of any Database checks, I simplified the 
image.py to  this:


def application(environ, start_response):
    status = '200 OK'

    file = open('.....', 'r')
    output = file.read()
    file.close()

    response_headers = [('Content-type', 'image/jpeg'),
                        ('Content-Length', str(len(output)))]

    start_response(status, response_headers)

    return [output]


Why is it so slow? And is there anything I can do about it?

Cheers,
Jan

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to