<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CFTHREAD is Sweet!</title>
	<atom:link href="http://www.barneyb.com/barneyblog/2007/09/27/cfthread-is-sweet/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.barneyb.com/barneyblog/2007/09/27/cfthread-is-sweet/</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<lastBuildDate>Thu, 11 Sep 2014 09:58:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2007/09/27/cfthread-is-sweet/comment-page-1/#comment-40050</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Fri, 28 Sep 2007 21:37:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/09/27/cfthread-is-sweet/#comment-40050</guid>
		<description>Kevin,

Yeah, that&#039;d make sense for a more typical gallery application.  In my case, things are a bit different in that there are tens (if not hundreds) of thousands of images, most of which aren&#039;t looked at in gallery format.  Also factor in the fact that thumbnails are required at different sizes, some of them dynamic.  As such, it&#039;s not really practical to pregenerate thumbnails.

I&#039;m actually using mod_rewrite to do most of the lifting.  Say I request a thumbnail such as &quot;tn/150-150-img0000180687.jpg&quot;.  mod_rewrite checks for that literal file on the filesystem, and if it exists, returns it to the browser.  If it doesn&#039;t exist, it hands off to CF to generate the thumbnail, write it to disk, and serve it to the browser.  On the next request that comes in, mod_rewrite will see the file already exists and serve it back directly.

That works amazingly well, but generating a large number of thumbnails can be expensive, so pregenerating specific subsets was the problem I was actual addressing.</description>
		<content:encoded><![CDATA[<p>Kevin,</p>
<p>Yeah, that'd make sense for a more typical gallery application.  In my case, things are a bit different in that there are tens (if not hundreds) of thousands of images, most of which aren't looked at in gallery format.  Also factor in the fact that thumbnails are required at different sizes, some of them dynamic.  As such, it's not really practical to pregenerate thumbnails.</p>
<p>I'm actually using mod_rewrite to do most of the lifting.  Say I request a thumbnail such as "tn/150-150-img0000180687.jpg".  mod_rewrite checks for that literal file on the filesystem, and if it exists, returns it to the browser.  If it doesn't exist, it hands off to CF to generate the thumbnail, write it to disk, and serve it to the browser.  On the next request that comes in, mod_rewrite will see the file already exists and serve it back directly.</p>
<p>That works amazingly well, but generating a large number of thumbnails can be expensive, so pregenerating specific subsets was the problem I was actual addressing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Sargent</title>
		<link>https://www.barneyb.com/barneyblog/2007/09/27/cfthread-is-sweet/comment-page-1/#comment-40046</link>
		<dc:creator>Kevin Sargent</dc:creator>
		<pubDate>Fri, 28 Sep 2007 21:14:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/2007/09/27/cfthread-is-sweet/#comment-40046</guid>
		<description>would it not be much much better to only create thumbs once though, and not per request? ? 

Even if they are uploaded via FTP, you can have a script check all new files and create thumbs &amp; save some info in a db so you don&#039;t re-create thumbs all the time.

Heck, an CF gateway event could even watch the images folder, and on change (new file, file removed) could run a script to make the new thumbs, or update the db about the missing files, etc..</description>
		<content:encoded><![CDATA[<p>would it not be much much better to only create thumbs once though, and not per request? ? </p>
<p>Even if they are uploaded via FTP, you can have a script check all new files and create thumbs &amp; save some info in a db so you don't re-create thumbs all the time.</p>
<p>Heck, an CF gateway event could even watch the images folder, and on change (new file, file removed) could run a script to make the new thumbs, or update the db about the missing files, etc..</p>
]]></content:encoded>
	</item>
</channel>
</rss>
