Forum OpenACS Development: Re: Compatibility Matrix

Collapse
24: Re: Compatibility Matrix (response to 9)
Posted by Dave Bauer on
Hi,

I have applied Victors changes and it works fine except when trying to update the context hierarchy or set permissions inheritance since it then fires the triggers to maintain the tables.

The code I got from Victor did not include any data model changes or changes to the triggers so I am not sure where to go from here.

I know Victor is on vacation but if someone from Vienna has some information, or anyone else, and I am leaving this message as a record of my progress.

Thanks
Dave

Collapse
25: Re: Compatibility Matrix (response to 24)
Posted by Gustaf Neumann on
Hi Dave,

not sure, about what exact set of changes victor has sent to you (we did most of the work in may 2010); however, the huge tree of the context hierarchy is not needed any more with the recursive queries (from the main openacs/dotlrn applications; one never knows about custom modifications) and was just kept to switch easier back to the old approach in case something was wrong. As far as i know, victor has sent the changes to a few expert users months ago to get some feedback about potential problems.

-gustaf

Collapse
26: Re: Compatibility Matrix (response to 25)
Posted by Dave Bauer on
Here is where I am experiencing some issues

2.5 seconds:
update acs_objects
set security_inherit_p = 'f'
where object_id = '1290509'

1.6 seconds
select acs_permission__grant_permission(
'182879',
'27310',
'read'
);

So it appears that these are probably updating acs_object_party_privilege_map and related tables via triggers with this which will get really slow if you need to update more than 1 object. Its already pretty slow, several seconds to change permissions on 1 object.

Collapse
27: Re: Compatibility Matrix (response to 26)
Posted by Dave Bauer on
I checked and I did update shared buffers to 128mb in my PG 9.1 config.
Collapse
Posted by Dave Bauer on
Very interesting results.

If you try to change the access policy on a bugtracker instance it calls set_inherit and grant_permission on every bug.

This can be hundreds of objects. The first ones took 1-2 seconds per query as the page runs by the end the last objects take 1 ms.

It appears Postgresql is loading the tables/indexes into memory and as that happens to seems to help.

Maybe this is not a signifigant issue unless you try to issue hundreds of small queries in one submission.

Collapse
29: Re: Compatibility Matrix (response to 25)
Posted by Victor Guerra on
Dave,

as Gustaf already mentioned in a previous post, the changes we made sometime ago were done in a way that switching back to the original implementation of permissions was done as easy as possible.

Therefore the code that I provided to you ( which can be found here: https://github.com/vguerra/permissions ) does not alter the current data model. By using recursive queries some tables and triggers are not necessary anymore but this is something we still have to do locally.

As soon as we make progress on that I'll provide the changes.

Best,