linked stylesheet slows down response

2 views
Skip to first unread message

lui...@gmail.com

unread,
Sep 24, 2007, 9:38:28 AM9/24/07
to web.py
I know it's been asked before, but I still don't know the answer...
Everytime I link a stylesheet to a template, the page takes too long
to load.
On the other hand, if I add the styles code right into the template,
it runs ok.
I am using the built-in server and the stylesheet is in the "static"
directory.

What's the problem here?

Aaron Swartz

unread,
Sep 24, 2007, 10:40:03 AM9/24/07
to we...@googlegroups.com
> What's the problem here?

Maybe the browser isn't caching the stylesheet?

Tom Berger

unread,
Sep 24, 2007, 10:41:40 AM9/24/07
to we...@googlegroups.com
The built-in web server is single threaded. You shouldn't experience this problem if you're hosting your app as a WSGI app behind a proper server.

--
Tom Berger
http://intellectronica.net/

Adam Atlas

unread,
Sep 24, 2007, 11:21:19 AM9/24/07
to we...@googlegroups.com

On 24 Sep 2007, at 10:41, Tom Berger wrote:
> The built-in web server is single threaded.

Even the now-included CherryPy wsgiserver? I thought that was
multithreaded and supposedly quite fast. And it looks like wsgi.py
only uses that now, not the old SimpleHTTPServer-based one.

lukaszt

unread,
Sep 24, 2007, 3:29:12 PM9/24/07
to web.py
Hi,
I'm adding this line when running on embedded server for development.
I realized that after adding this, /static files are served faster.

web.httpserver.runsimple = web.httpserver.runbasic

I've found it here: http://groups.google.com/group/webpy/msg/74b65deeb69a02a8
some time ago

- Luke

lui...@gmail.com

unread,
Sep 24, 2007, 4:46:02 PM9/24/07
to web.py

On Sep 24, 4:29 pm, lukaszt <lukasz.t...@gmail.com> wrote:
> Hi,
> I'm adding this line when running on embedded server for development.
> I realized that after adding this, /static files are served faster.
>
> web.httpserver.runsimple = web.httpserver.runbasic
>
> I've found it here:http://groups.google.com/group/webpy/msg/74b65deeb69a02a8
> some time ago
>
> - Luke

That works like a charm.
Thank you Luke!
Luis

JList

unread,
Oct 6, 2007, 12:20:31 PM10/6/07
to web.py
I wonder why this is the case - shouldn't the cherrypy server be
faster than the SimpleHTTPServer?

> > I'm adding this line when running on embedded server for development.
> > I realized that after adding this, /static files are served faster.
>

> > web.httpserver.runsimple= web.httpserver.runbasic

大郎

unread,
Oct 6, 2007, 12:27:49 PM10/6/07
to we...@googlegroups.com
I want know too.
--
每个人都有一片属于自己的森林, 迷失的消失了, 相逢的还会再相逢...
Gtalk : iexper(at)gmail.com
Reply all
Reply to author
Forward
0 new messages