Increasing performance on my homepage / 2012-01-25

2012-01-25 Increasing performance on my homepage 9 years ago
On the bottom right of my homepage is very small print with the total time taken from the start of the script to the end. I hadn't looked at it myself in a while but I noticed the total time had gone up to 0.55 seconds, which is a bit much. So I started looking where all the time went. The first problem area was the twitter feed: I parsed the (locally stored) twitter rss feed on each go and found out that took a bit more than 0.2 seconds. I guess XML::RSS parsing isn't too fast. I moved the parsing to the script which fetches the rss feed and moved the data to a postgres table, that saves quite some time. The next time saver was a new index on the table which links the newsitems with the tags. That saved another 0.2 seconds. There is still room for more speedup, but this is a nice start, processing times are back to 0.14-0.15 seconds. A bit more time was shaved off by showing less news items on my homepage. I write a lot longer news items now in 2012 than I did back in 1999.

Tags: , ,

IPv6 check

Running test...
, reachable as koos+website@idefix.net. PGP encrypted e-mail preferred. PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers

RSS
Meningen zijn die van mezelf, wat ik schrijf is beschermd door auteursrecht. Sommige publicaties bevatten een expliciete vermelding dat ze ongevraagd gedeeld mogen worden.
My opinions are my own, what I write is protected by copyrights. Some publications contain an explicit license statement which allows sharing without asking permission.
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews
This page generated by $Id: newsitem.cgi,v 1.54 2020/12/31 15:36:31 koos Exp $ in 0.005131 seconds.