Re: Using DB to cache METARs ?
Brought to you by:
iridium
From: Phil P. <phi...@sw...> - 2004-01-04 07:25:52
|
I turned on *everything* for verbosity, and here's what it says.... Debug: get_location(): Looking for location in the database. Debug: The METAR is not set, I'll try to find the METAR in the database.. Debug: Returning this row from the DBA database: YSSY 040627Z 03021G34KT CAVOK 27/19 Q1007 NOSIG:1073197620. Debug: get_metar_from_db(): Found the METAR in the database. Debug: get_location(): Using old location: Sydney Airport, Australia. Debug: get_metar_from_db(): The METAR for Sydney Airport, Australia was 1073114715 seconds too old.. Debug: get_location(): Using old location: Sydney Airport, Australia. Debug: get_metar_from_web(): Updating METAR for Sydney Airport, Australia. Debug: Updating this row in the DBA database: YSSY 040627Z 03021G34KT CAVOK 27/19 Q1007 NOSIG:1073197620. Debug: get_location(): Looking for location in the database. Debug: The METAR is not set, I'll try to find the METAR in the database.. Debug: Returning this row from the DBA database: YSSY 040627Z 03021G34KT CAVOK 27/19 Q1007 NOSIG:1073197620. Debug: get_metar_from_db(): Found the METAR in the database. Debug: get_location(): Using old location: Sydney Airport, Australia. Debug: get_metar_from_db(): The METAR for Sydney Airport, Australia was 1073114720 seconds too old.. Debug: get_location(): Using old location: Sydney Airport, Australia. Debug: get_metar_from_web(): Updating METAR for Sydney Airport, Australia. Debug: Updating this row in the DBA database: YSSY 040627Z 03021G34KT CAVOK 27/19 Q1007 NOSIG:1073197620. Debug: get_location(): Using old location: Sydney Airport, Australia. Debug: The METAR was set - I'll just use that.. Debug: get_location(): Using old location: Sydney Airport, Australia. Debug: The METAR was set - I'll just use that.. FYI: the METAR timestamp is 040627Z, ie 06:27 UTC on the 4th. Time now is 07:23UTC on the 4th, so it should have decided it was within the cache-timeout and not gone to the web. Hopefully someone out there can gimme a hand to work this one out. Thanks, PhiL P Phil Pierotti wrote: > Supposedly using a DB of some kind to cache METARs makes things faster. > Is there any to DEBUG this? > Because I'm finding it's simply not any faster at all. > > (and FYI I don't have shell access to the machine, so any debug will > have to be via PHP scripting or something) > > Page generation takes anywhere from 1.4 to 1.9 seconds. > When I use NO DB, *and* when I use Sleepycat DB3. > > The METAR was generated less than 1 hour ago, so after I've refreshed > the page a couple of times, in theory the data should be in the > database, right? > > Lemme know if you have any ideas where I can look to fit it and get the > caching working. As obviously ~1.5 seconds per page is simply not > accceptable. > > Thanks > Phil P > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel > > |