Isaac,

That's an interesting guess and comment. We should test it and see if it
does degrade performance as you suggest.

Sean,

Check out my post from Feb where we had a similar issue:

http://www.coldfusionmuse.com/index.cfm/2008/2/12/leaky.heap.jvm


At least it will give you something to look for.

-Mark 


Mark A. Kruger, CFG, MCSE
(402) 408-3733 ext 105
www.cfwebtools.com
www.coldfusionmuse.com
www.necfug.com

-----Original Message-----
From: s. isaac dealey [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 06, 2008 6:55 PM
To: CF-Talk
Subject: Re: Jrun Memory Usage Problem: could fileexists() be the culprit?

Hey Sean, 

I know you said you already did a thorough code review and fixed all the
errors so you're not having any application errors, however, my guess would
be there's still some kind of subtle recursion-related issue that's been
overlooked. I would be real surprised if fileexists() does anything other
than this: 

return CreateObject("java","java.io.File").init(thepath).exists(); 

The only case in which I think you might find fileexists() creating extra
overhead is in the case that there are massive (tens of thousands) of
instances of it where the first character in the path is a / -- because
under the hood, the only other thing it should be doing as far as I know is
utilizing the CF server mappings. So if there are lots of mappings and the
path starts with a / and moreso if it's got several slashes in it, then all
those things combined could create some unexpected extra overhead. 

The extra slashes is an interesting issue also... it's funny because I never
realized until CF8 that people were using mappings where the name of the
mapping actually has extra slashes in it like "/com/mycompany" - I'd always
thought mappings were atomic like "com", but apparently not. So when the
file path is something like "/images/catalog/2/myfile", the part of the
server responsible for mappings has to check for a mapping of
"/images/catalog/2" then again for "/images/catalog" and finally for
"/images". In the vast majority of cases, this doesn't cause any problems,
but you can see how, particularly if the server had a lot of mappings, lots
of calls to the map manager could potentially add up to some unusual
problems related to memory. I'm actually not aware of having seen any
confirmed cases in which it did cause a problem. It's possible you could be
the first (or the first I've seen), although it wouldn't be my first guess. 

There is one way to find out however if fileExists is doing a lot more than
you maybe need or want it to do and that would be to put it into a test
harness and time its execution compared to the java equivalent I gave above
and watch memory consumption on the machine. Don't do this on your
development or staging server -- load CF8 onto a workstation and run it
locally by itself to test this. I don't think you would need to run the web
stress analyzer against it to know whether or not it's causing memory issues
-- but load up the server with lots of mappings and use file paths that
start with the forward slash / and have several slashes in them, to make
sure you're testing the worst case scenario. 

Good luck! 

--
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
     ph: 617.365.5732

http://onTap.riaforge.org/blog





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307026
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to