Page 1 of 1

Re: Slow css and feeds

Posted: Thu May 01, 2008 1:10 am
by garvinhicking
Hi!

You could "statify" the CSS and .htc behaviour files:Turn them into real, normal HTML documents without active code.

The CSS file currently executes the whole s9y api, if you make it a static template you will loose the ability to add new event plugins on the fly, but gain the ability to have plain CSS textfiles. You can edit your templateto use that static CSS file, and leave the serendipity.css intact so that you can always simply wget that and put its content into a "serendipity2.css" file or something like that.

The behaviour file currently is routed through the event plugin API; you could remove thebrowser compatibility pluginto rid of it, or write a "static" variant of that plugin.

About the RSS2 feed: That one takes time. Actually it should take the same time like the atom feed. I guess that the atom is only faster because the DB query is cached. If you were to ask the atom feed before the RSS2 feed, the atom one should be the slow one. There's not much you can tune in the RSS feed.

HTH,
GArvin

Posted: Thu May 01, 2008 1:38 am
by garvinhicking
WRT the feeds... couldn't they be generated once when new entries are published and then be cached?
Not really, because the rss.php can conditionally/dynymically check all sorts of things: Login status of users, only fetch certain articles from Atuhor X or category Y, fetch different RSS-Versions/templates, fetch specific items from time Z til now, and even conditionally only return you those entries that you have not seen since.

The RSS feed doesemploy HTTP Conditional Caching, so that clients won't re-execute the RSS-Feed if their client supports the usual HTTP caching headers (which most do).

HTH,
GArvin

Posted: Thu May 01, 2008 3:38 pm
by judebert
garvinhicking wrote:...the rss.php can conditionally/dynymically check all sorts of things: ... fetch specific items from time Z til now, and even conditionally only return you those entries that you have not seen since.
Whoa! I was just looking at that in the specs, and couldn't find it! How do you tell the RSS feed to only fetch items since time t?

Posted: Thu May 01, 2008 8:05 pm
by garvinhicking
Hi judebert!

Through the HTTP "If-Modified-Since" header :)

Regards,
Garvin

Posted: Thu May 01, 2008 9:17 pm
by judebert
:idea: :oops:

Maybe I should look at the rss.php and see what it uses.