I was thinking about going directly to the User and skipping the
SecurityController, but then I felt that the user should know about how its
access is applied. Meaning that, while a user might know its own roles, only
the Security system itself should understand how the roles are applied to
the application.

That just made more sense in my mind.

Thanks,
Ben


-----Original Message-----
From: Barney Boisvert [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 18, 2005 2:49 PM
To: CF-Talk
Subject: Re: Nested CFC Method calls

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.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

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