Slow css and feeds

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Slow css and feeds

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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?
Judebert
---
Website | Wishlist | PayPal
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi judebert!

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

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

:idea: :oops:

Maybe I should look at the rss.php and see what it uses.
Judebert
---
Website | Wishlist | PayPal
Post Reply