Recently, I was doing some work on an internal system where I was doing some image processing. I was taking uploaded images and resizing them into a smaller preview image on request. The code for this is quite simple.
2<cfimage action="resize" height="150" source="#myImg#" width="150">
3<cfimage action="writeToBrowser" source="#myImg#">
However, when running the code it was taking between 30-60 seconds to run. I tried a bunch of different things to get it to work correctly. I even rewrote it in cfscript to see if that would help. Well, it didn't, no difference. The processing till took forever.
At this point I opened up the ColdFusion server monitor. The monitor will allow me to see what the request is actually getting stuck on. With the monitor running I ran the code again a few times. Once normal, and another with the image resize code commented out. The monitor showed me that the code was indeed getting stuck on the resize.
I then started looking at the source images. The images were all under 1mb so size issue was now out. On a whim I ran a test using a jpg image. This time the image processed immediately. Returned in under a second and resized as expected.