> -----Original Message-----
> From: Tony Hicks [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 31, 2004 9:38 AM
> To: CF-Talk
> Subject: Re: Well - I feel like an idiot.
> 
> Humbly, I was wrong on the locks on application variables.. thats
> information to file for later, thanks.

No need to be humble about it.  The pre-MX locking implementation was
perhaps the biggest gaff in the history of CF and is still one of the most
confusing things.  Let's just all be happy that they fixed it in MX.  ;^)

> But I can't see how both CFIFs are necessary... The outer cfif will
> likely never affect anything.
> 
> If two people hit the site, one request behind another, they'll both
> fire all the way up to the cflock at the same speed, and as we all
> know, that's where the magic comes in.. cflock single threads on the
> init process and one is done before the other.. The outer cfif will
> not catch anything that the inner cfif does not.

It will catch everybody AFTER this process is complete.

You're absolutely right about the behavior while the initialization is
running - but after it's done the outer CFIF means that all visitors simply
check the status and move on rather than obtain a lock and THEN check the
status.

I may not have been clear, but this code is in Application.CFM - which means
its run by every request.  Because it's so central I want this code to run
as fast as possible.
 
> I do wonder if it might be smarter to set application.init to
> SOMETHING before the init process inside the cflock... but I doubt
> that would change anything either.

I considered it, but I didn't see any benefit to the init process.  That
process, itself, doesn't have to be as optimized (it's only run once...
now).  It's getting past it when it has been run that needs to be optimized.

> This is funny, we're arguing tiny fractions of time here.

Tiny fractions of fractions to be sure!  But isn't that what optimization is
all about.  ;^)

This code, as an aside, is on a site that gets lots of traffic in short (two
day) burst.  In case the little optimizations do actually pay off.

Jim Davis



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189056
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to