From: Jayesh Viradiya on
"Now with the same code on CF8 it is very slow...using CFimage or Alagad."

Let me calrify the above line of yours....Are you saying that CFIMAGE and
ALAGAD both are slow on CF8 ?

Is it slow all the time or only the first time you access this page ?

Thanks
Jayesh Viradiya
Adobe CF Team

From: hillbillyfunk on
[Q]..Are you saying that CFIMAGE and ALAGAD both are slow on CF8 ? [/Q]
>>correct they are both very slow...it seems around the same speed.

[Q]Is it slow all the time or only the first time you access this page ?[/Q]
All the time. And, the more I try, the more Java memory errors I get. I'm
using CFDynamics as a host, and they have applied the latest hotfixes.

From: hillbillyfunk on
Here is the out of memerory error message--

thanks--

500

ROOT CAUSE:

java.lang.OutOfMemoryError: Java heap space



javax.servlet.ServletException: ROOT CAUSE:

java.lang.OutOfMemoryError: Java heap space



at
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilte
r.java:70)

at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)

at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)

at jrun.servlet.FilterChain.service(FilterChain.java:101)

at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)

at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)

at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)

at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)

at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)

at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)

at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)

at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)

at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

From: ksaini on
Hi,
I tried with cfimage(CF8) and alagad(on CF7 and CF8). I have used the same
scenario as you mentioned in the code. i.e
1. To read a jpg image (70kb)
2. Resizing it.
3. Pasing a .png file on it
4. Writing it back to disk

To process 100 such images both cfimage and alagad are taking less than a
minute.
Here is the code for cfimage:

<cfset t1 =Now()>
<cfloop from=0 to=100 index=cf_index step=1>
<cfset imageToConvert = "C:\ColdFusion8\wwwroot\testbench\test" & "\" &
"Sunset.jpg" >
<cfset imageToWrite = "C:\ColdFusion8\wwwroot\testbench\test" & "\" &
"Sunset_resize" & "#cf_index#" & ".jpg">

<!--- cfimage --->
<cfset myImage=ImageRead(imageToConvert)>

<cfset ImageResize(myImage,"1349","1753","HIGHESTPERFORMANCE")>
<cfimage source="C:\ColdFusion8\wwwroot\testbench\test\test.png"
name="topImage">
<cfset ImagePaste(myImage,topImage,0,0)>

<!--- output the new image --->
<cfset ImageWrite(myImage,imageToWrite)>
</cfloop>
<cfimage source=#myImage# action = "writeToBrowser">

<cfset t2 = Now()>
<cfset t3 = DateDiff("s", t1,t2)>

<br /><cfoutput>Time taken : <cfdump var = "#t3#"> sec</cfoutput>


Thanks
Kunal Saini
Adobe CF Team


From: hillbillyfunk on
Thanks for looking into this Kunal. I found out why this was taking very long
for me. The PNG I was pasting over the jpgs was at a resolution of 300 dpi.
When I changed it to 72, the code ran quickly. So beware, using ImagePaste
with an image over 72 dpi will suck up a ton of memory and take a long time.
This doesn't seem to be an issue using Alagad's component on CF7, so I'm
thinking this is a bug in CF8.

-Karl