also available in rss format
10/04/09 @ 08:40:35
since i've been running Luke's uberFeed it's become apparent that the page load was rather slow, it wasn't unusable but the drag did show. in an earlier post i explained how the feed works the meat of the exercise being to pull content from rss feeds with the cfhttp tag, all well and good but not really very scalable performance wise.
i did look at the cfcache tag to speed things up but it didn't really feel right, i didn't like the idea of caching pages on user's machine and even less the idea of caching them temporarily serverside it just felt a bit like shifting the problem around. the final approach i decided upon would be to build a hard-coded page every ten minutes or so, it's hardly like my news is mission-critical now is it :-)
the solution was very simple. all i did was to hack out the part of the code which grabs and formats the feeds and dump it's output into a separate file, this separate file (we'll call it buildMyPage.cfm) did exactly the same as it's always done but this time stashes the output in a cfsavecontent tag.
<cfsavecontent variable = "thePageContent">
<!--- here we have cfhttp calls, queries, formatting, queries of queries, formatting and html output --->
</cfsavecontent>
cfsavecontent enables us to save the output of any coldfusion template into a variable - meaning it becomes just a plain string of text. this text is then written to a flat file which the original homepage template can call in with a cfinclude which is massively more efficient than a dynamic call and process each and every time someone hits the page.
<cffile action = "write"
file = "#expandPath('.')#\thePageContent.txt"
output = "#thePageContent#">
riding high on my wave of success i duplicated the method for the rss feed also, that too is now written out every ten minutes so that there's no risk of feedburner timing out when it grabs the xml.
so now
- every ten minutes or so buildMyPage.cfm gets called from the cfscheduler
- buildMyPage does it's collection, aggregation and formatting work
- buildMyPage overwrites the include file.
- a user hits the site and gets a VERY quick load (worst case scenario a 10 minute old page)
sometimes you gotta take a small hit to achieve a great gain in perfomance. i hope you appreciate my efforts to bring you prattle at break neck speed.

on 05/09/10 @ 10:23:11 posted from twitter
is dukenukem forever really gonna happen in 2011? linkage bring it on!

on 02/09/10 @ 19:15:28 posted from twitter
google's new artificial intelligence API linkage (aka skynet!)

on 17/08/10 @ 21:17:04 posted from google news
oh yes! stay on target.

on 03/08/10 @ 21:29:57 posted from google news
been using this for a while, can say it's rather excellent.

on 23/07/10 @ 16:54:02 posted from google news
believe it or not, whilst reading this - i got distracted :-/

on 23/07/10 @ 16:41:25 posted from google news
i'd missed this... how many more variations on the size of panel do we need?

on 02/06/10 @ 17:31:38 posted from google news
the classic DB5 up for auction, yeah - i'll be bidding...

on 28/04/10 @ 14:12:45 posted from newWord
bigot - a prejudiced person who is intolerant of any opinions differing from their own

on 04/04/10 @ 12:00:00 posted from picasa
an Easter bank holiday weekend away in Devon
5 photos after the jump!

on 07/03/10 @ 19:33:43 posted from picasa
a week's holiday in the Canaries, March 2010
33 photos after the jump!

on 11/02/10 @ 13:00:00 posted from picasa
a bunch of random photos taken when out and about
7 photos after the jump!

on 09/01/10 @ 17:51:42 posted from picasa
a chilly walk out across the Studland beach in Dorset
18 photos after the jump!

on 23/12/09 @ 16:21:46 posted from picasa
good ol' family xmas in Sparsholt, Oxfordshire 2009
17 photos after the jump!

on 05/10/09 @ 11:51:32 posted from youtube
time lapse test of me sat at my desk for a couple of hours (not exciting!). taken using sheado.net 'time-lapse' application on Android phone
42 second clip after the jump!

on 25/08/09 @ 06:44:33 posted from youtube
the stunning Eurofighter Typhoon seen at Bournemouth Air Festival 2009
170 second clip after the jump!

on 24/07/09 @ 17:39:54 posted from youtube
This video was uploaded from an Android phone.
20 second clip after the jump!

on 17/07/09 @ 13:35:48 posted from youtube
This video was uploaded from an Android phone.
14 second clip after the jump!

on 15/03/09 @ 21:23:31 posted from youtube
the lovely Durdle seen from the cliff above on a sunny Sunday in March
65 second clip after the jump!
Coldfusion
- a much faster homepage
- pop3 picture extraction and API fun
- lukes uberfeed
Random
- download festival 2009
- hashtag invented
- learn some new words
- xmas messages