<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Increasing the Performance of WURFL (for at least one case)</title>
	<atom:link href="http://www.thisismobility.com/blog/2006/06/10/increasing-the-performance-of-wurfl-for-at-least-one-case/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thisismobility.com/blog/2006/06/10/increasing-the-performance-of-wurfl-for-at-least-one-case/</link>
	<description>Ripping mobility from the clutches of telecom</description>
	<pubDate>Fri, 21 Nov 2008 13:36:27 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: miker</title>
		<link>http://www.thisismobility.com/blog/2006/06/10/increasing-the-performance-of-wurfl-for-at-least-one-case/#comment-9507</link>
		<dc:creator>miker</dc:creator>
		<pubDate>Thu, 22 Jun 2006 16:18:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.thisismobility.com/blog/?p=131#comment-9507</guid>
		<description>Hey Andrea,
    Actually, I had read the stuff about caching at wurfl.sourceforge.net, but I found a lot of them weren't true for the environment I was working in.  I think it's because I'm working with a much bigger active device list than most sites do.  The churn in the agent2id cache was actually generating a lot more load than it was saving.  I made a few other changes I think might be interesting for folks running sites with frequent turnover in active devices:

http://www.thisismobility.com/blog/?p=141

I haven't done the exploding of every device's capabilities into every cache file, but I think that might be a good one.  Thanks for the reply!
- Mike</description>
		<content:encoded><![CDATA[<p>Hey Andrea,<br />
    Actually, I had read the stuff about caching at wurfl.sourceforge.net, but I found a lot of them weren&#8217;t true for the environment I was working in.  I think it&#8217;s because I&#8217;m working with a much bigger active device list than most sites do.  The churn in the agent2id cache was actually generating a lot more load than it was saving.  I made a few other changes I think might be interesting for folks running sites with frequent turnover in active devices:</p>
<p><a href="http://www.thisismobility.com/blog/?p=141" rel="nofollow">http://www.thisismobility.com/blog/?p=141</a></p>
<p>I haven&#8217;t done the exploding of every device&#8217;s capabilities into every cache file, but I think that might be a good one.  Thanks for the reply!<br />
- Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea Trasatti</title>
		<link>http://www.thisismobility.com/blog/2006/06/10/increasing-the-performance-of-wurfl-for-at-least-one-case/#comment-9423</link>
		<dc:creator>Andrea Trasatti</dc:creator>
		<pubDate>Thu, 22 Jun 2006 10:30:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.thisismobility.com/blog/?p=131#comment-9423</guid>
		<description>Hi Mike,
    thanks for the good post on WURFL. It's always good to see people's experiments. It's just a pity that you took this time hacking the PHP library when you could have found the exact same conclusions on the WURFL website. Take a look at this page and paragraph:
http://wurfl.sourceforge.net/php/index.php#caching

There is also another performance improvement that you might consider, that is to reduce the number of files in the directory. You could:
a) generate symbolic links when a device in WURFL doesn't have any specific capability instead of a real file. This breaks a little bit the fall_back tree, but if performance is your concern, this should help
b) store the tiny cache files in a directory tree instead of a single directory. Using the first 3-4 characters should be enough.

A final optimization that I considered but never implemented was to explode every device's capabilities in every single cache file. This will mean that when a user-agent hits your site you will find all the device information in a single cache file and not load 3, 4 or 5 tiny files. Of course APC helps you in your current configuration as it has all the most common files in shared memory which is even faster the loading a file. You could do this in the update_cache.php script, because I can tell you it will take time.

Some performance tests showed that depending on the file size, sometimes var_dump is better performing, some other times serialize is better. I'll leave to you these tests, if you'd like. wurfl_parser.php already has the lines, you just need to adapt them to the multicache.

- Andrea</description>
		<content:encoded><![CDATA[<p>Hi Mike,<br />
    thanks for the good post on WURFL. It&#8217;s always good to see people&#8217;s experiments. It&#8217;s just a pity that you took this time hacking the PHP library when you could have found the exact same conclusions on the WURFL website. Take a look at this page and paragraph:<br />
<a href="http://wurfl.sourceforge.net/php/index.php#caching" rel="nofollow">http://wurfl.sourceforge.net/php/index.php#caching</a></p>
<p>There is also another performance improvement that you might consider, that is to reduce the number of files in the directory. You could:<br />
a) generate symbolic links when a device in WURFL doesn&#8217;t have any specific capability instead of a real file. This breaks a little bit the fall_back tree, but if performance is your concern, this should help<br />
b) store the tiny cache files in a directory tree instead of a single directory. Using the first 3-4 characters should be enough.</p>
<p>A final optimization that I considered but never implemented was to explode every device&#8217;s capabilities in every single cache file. This will mean that when a user-agent hits your site you will find all the device information in a single cache file and not load 3, 4 or 5 tiny files. Of course APC helps you in your current configuration as it has all the most common files in shared memory which is even faster the loading a file. You could do this in the update_cache.php script, because I can tell you it will take time.</p>
<p>Some performance tests showed that depending on the file size, sometimes var_dump is better performing, some other times serialize is better. I&#8217;ll leave to you these tests, if you&#8217;d like. wurfl_parser.php already has the lines, you just need to adapt them to the multicache.</p>
<p>- Andrea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Rowehl: This is Mobility &#187; Blog Archive &#187; WURFL Lightweight for PHP</title>
		<link>http://www.thisismobility.com/blog/2006/06/10/increasing-the-performance-of-wurfl-for-at-least-one-case/#comment-9350</link>
		<dc:creator>Mike Rowehl: This is Mobility &#187; Blog Archive &#187; WURFL Lightweight for PHP</dc:creator>
		<pubDate>Wed, 21 Jun 2006 22:40:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.thisismobility.com/blog/?p=131#comment-9350</guid>
		<description>[...] I had another one of those WURFL hacking episodes aimed at getting WURFL to work better for sites with large groups of active devices. And here it is. I&#8217;ve started calling it WURFL lightweight. Everyone looks up device info by user agent, so it&#8217;s optimized for that. It also assumes a few things: [...]</description>
		<content:encoded><![CDATA[<p>[...] I had another one of those WURFL hacking episodes aimed at getting WURFL to work better for sites with large groups of active devices. And here it is. I&#8217;ve started calling it WURFL lightweight. Everyone looks up device info by user agent, so it&#8217;s optimized for that. It also assumes a few things: [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
