Probably wasn't running on outdated hardware with outdated software (I
mean, how long has CF7 been out?!) :)
Once things are cached everything is generally hunky-dorry (except for
those darn displayTypeBody webskins, those just don't seem to cache).
Seriously though, Is there a reason I can't have the line
<cfset this.cache.defaultroles =
this.factory.role.getDefaultRoles() />
be placed right after
<cfset this.cache = structnew() />
? Here is the code for security init as it exists in my install:
<cffunction name="initCache" access="public" output="false"
returntype="void" hint="Initialises the security cache">
<cfset var comp = "" />
<!--- Cache --->
<cfset this.cache = structnew() />
<cfset this.cache.roles = structnew() />
<cfset this.cache.permissionlookup = structnew() />
<cfset this.cache.rolelookup = structnew() />
<!--- Factory --->
<cfset this.factory.role = createObject("component",
application.factory.oUtils.getPath("types","farRole")) />
<cfset this.factory.permission = createObject("component",
application.factory.oUtils.getPath("types","farPermission")) />
<cfset this.factory.barnacle = createObject("component",
application.factory.oUtils.getPath("types","farBarnacle")) />
<!--- User directories --->
<cfset this.userdirectories = structnew() />
<cfset this.userdirectoryorder = "" />
<cfloop
list="#application.factory.oUtils.getComponents('security')#"
index="comp">
<cfif comp neq "UserDirectory" and
application.factory.oUtils.extends(application.factory.oUtils.getPath("security",comp),"farcry.core.packages.security.UserDirectory")>
<cfset ud =
createobject("component",application.factory.oUtils.getPath("security",comp)).init()
/
>
<cfset this.userdirectories[ud.key] = ud />
<cfset this.userdirectoryorder =
listappend(this.userdirectoryorder,ud.key) />
</cfif>
</cfloop>
<cfset this.cache.defaultroles =
this.factory.role.getDefaultRoles() />
</cffunction>
Thanks,
Tomek
On Oct 26, 9:53 pm, Blair McKenzie <[email protected]> wrote:
> The slowest I've found a 5.x site was probably 20-30 seconds, on a server
> that was hosting about a dozen similar sites.
>
> On Wed, Oct 27, 2010 at 12:46 PM, Tomek kott <[email protected]> wrote:
> > That's what I was afraid of. I'll take a look and see if there is any
> > way to speed things up for the init call...
>
> > On Oct 26, 3:45 pm, Blair McKenzie <[email protected]> wrote:
> > > Wow. That should definitely not be 20 seconds worth of processing. But
> > then
> > > 5 minutes for an update app seems excessive too.
>
> > > On Wed, Oct 27, 2010 at 12:05 AM, Tomek kott <[email protected]>
> > wrote:
> > > > No, I absolutely avoid an updateapp at all times. That's only reserved
> > > > for major changes in the code (usually something like 5.0 to 5.1).
> > > > Everything else is handled by an updating the appropriate part of the
> > > > application through Admin->Developer -> Utilities -> Reload
> > > > Application (it exists). Specifically with the security, it happens
> > > > whenever I do any of the following:
>
> > > > 1) Browse to a navigation permission role
> > > > 2) Set a navigation permission
> > > > 3) Navigate to Admin -> Permission
> > > > 4) Save / add a new permission
>
> > > > I know its not doing a full updateapp because that takes even longer
> > > > (say 5 minutes). I can understand if the system tries to pre-cache
> > > > some permissions calls, but doesn't quite make sense to me if it is as
> > > > simple as the security.init() call.
>
> > > > Tomek
>
> > > > On Oct 25, 10:43 pm, Blair McKenzie <[email protected]> wrote:
> > > > > Is the delay because you're doing an updateapp? You should be able to
> > > > > refresh just security by in the Webtop with Admin->Developer
> > > > > Utilities->Reload Application (I can't remember what version of FC
> > that
> > > > > appeared in). Alternatively you can add your own Webtop function that
> > > > calls
> > > > > application.security.init(). That should be very quick, and will
> > clear
> > > > out
> > > > > the security cache.
>
> > > > > Blair
>
> > > > > On Tue, Oct 26, 2010 at 1:35 PM, Tomek kott <[email protected]>
> > > > wrote:
> > > > > > I'm on a slow server, running old software (CF 7 + FC 5.1.12). At
> > the
> > > > > > moment, nothing I can do about that. However, one thing I would
> > like
> > > > > > to do is not to have the site crash because I need to change
> > > > > > permissions. Basically, it seems like when resetting the security,
> > > > > > there is a moment when CACHE.DEFAULTROLES is undefined for the
> > > > > > security scope.
>
> > > > > > Unfortunately, the "moment" can be long on our server (like, 20
> > > > > > seconds). Not good. Is there a way to lock / speed things up so
> > that
> > > > > > the error doesn't crash processing?
>
> > > > > > Thanks,
>
> > > > > > Tomek
>
> > > > > > --
> > > > > > You received this message cos you are subscribed to "farcry-dev"
> > Google
> > > > > > group.
> > > > > > To post, email: [email protected]
> > > > > > To unsubscribe, email:
> > > > > > [email protected]<farcry-dev%[email protected]>
> > <farcry-dev%[email protected]<farcry-dev%[email protected]>
>
> > > > <farcry-dev%[email protected]<farcry-dev%[email protected]>
> > <farcry-dev%[email protected]<farcry-dev%[email protected]>
>
> > > > > > For more options:http://groups.google.com/group/farcry-dev
> > > > > > --------------------------------
> > > > > > Follow us on Twitter:http://twitter.com/farcry
>
> > > > --
> > > > You received this message cos you are subscribed to "farcry-dev" Google
> > > > group.
> > > > To post, email: [email protected]
> > > > To unsubscribe, email:
> > > > [email protected]<farcry-dev%[email protected]>
> > <farcry-dev%[email protected]<farcry-dev%[email protected]>
>
> > > > For more options:http://groups.google.com/group/farcry-dev
> > > > --------------------------------
> > > > Follow us on Twitter:http://twitter.com/farcry
>
> > --
> > You received this message cos you are subscribed to "farcry-dev" Google
> > group.
> > To post, email: [email protected]
> > To unsubscribe, email:
> > [email protected]<farcry-dev%[email protected]>
> > For more options:http://groups.google.com/group/farcry-dev
> > --------------------------------
> > Follow us on Twitter:http://twitter.com/farcry
--
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry