On Fri, Jun 12, 2009 at 2:45 AM, AD7six<[email protected]> wrote:
>
>
>
> On Jun 12, 6:07 am, brian <[email protected]> wrote:
>> I have a function which reorders a tree list using TreeBehavior's
>> moveup()/movedown(). This list is, more or less, a set of navigation
>> links. I'm using ACL so that I can display a slightly different
>> version for each of several (5-10) groups. To avoid having to make an
>> ACL lookup every page view, the trees are cached. So, any time a node
>> is edited/added/deleted/moved, I remove the cached trees. This is
>> generally ok as these actions will be performed only sporadically and
>> always by an admin.
>>
>> To move nodes around, I'm using some jquery drag & drop and then
>> sending an AJAX request. The method that handles the move includes a
>> call to __removeGroupSections() (shown below). I'm consistently seeing
>> this request take ~20 seconds. If I comment out the call to
>> __removeGroupSections() the request comes back in ~1 second.
>>
>> So, can anyone suggest a faster way to accomplish this?
>
> I'd suggest xdebug -> profile -> see where your 20s are going.
I'll check out using xdebug. It's certainly fine when I comment out
the Cache::delete()
> Why don't you put all your acl in a single folder (e.g. tmp/cache/
> acl/, create a new cache config to encompass it) then you can bulk
> delete them. (e.g exec('rm -rf tmp/cache/acl/*') ) or some other such
> planning for deletinging some/all strategy.
Bulk deleting works. Thanks for the tip.
The weird thing is that I've just discovered that there's some other
problem on the staging server. There's an error with this line:
$aros = $this->Acl->Aro->find('all');
I can't figure out how to debug this. Processing stops right there.
In any case, your alternative cache config idea works for now, so
there's no need for the find() call. In the meantime, I'm going to see
about installing memcached.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---