Turn of the execution times in the CF debugging output.  That's known
to make CFCs drag like nothing else.  Turning it off makes things
enormously faster.  Though 60 milliseconds isn't particularly slow. 
Certainly not enough to warrant performance investigations.  It could
easily be explained away in numerous reasons, the most likely being
CFC instantiation (which is fairly slow).

And skip the security manager, just ask your user directly if they
have a specific role.  Won't noticiably affect performance, but it's a
better route to go if you ask me.

cheers,
barneyb

On 7/18/05, Ben Nadel <[EMAIL PROTECTED]> wrote:
> I am trying to make a basic security controller for a web application
> system. The idea is that there is a User CFC and a SecurityController CFC.
> The User stores it list of roles and teh security controller determines if
> the user has to parts of the site. Example:
> 
> 
> 
> <cfif SecurityController.HasAccess(User, "publications")>....</cfif>
> 
> 
> 
> Inside the HasAccess method it returns:
> 
> 
> 
> <cfreturn ARGUMENTS.User.HasRole(ARGUMENTS.Role) />
> 
> 
> 
> Ok, now the problem is that the page where I build my navigation has like 15
> of these CFIF statements. The page takes like 60 ms to run (and like 300+ on
> a crappy machine). I am trying to figure out where the bottle neck is.
> 
> 
> 
> Even when my User.HasRole() method returns a static "1"... the template
> still takes a while to run.
> 
> 
> 
> It appears that the bulk of the overhead here comes directly from the fact
> that i am using nested method calls. Does this make sense? I have tried to
> remove all content other than the CFIF tags themseleves and the run time
> doesn't change.
> 
> 
> 
> Please help. Either my architecture is complete junk, or CFCs just have
> waaaay more overhead than i realized.
> 
> 
> 
> Thanks,
> 
> Ben
> 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212139
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