| Summary | Groups SQL driver |
| Queue | Horde Framework Packages |
| Queue Version | HEAD |
| Type | Enhancement |
| State | Resolved |
| Priority | 1. Low |
| Owners | Chuck Hagenbuch <chuck (at) horde (dot) org> |
| Requester | Duck <duck (at) obala (dot) net> |
| Created | 01/30/2008 (103 days ago) |
| Due | |
| Updated | 04/08/2008 (34 days ago) |
| Assigned | 04/05/2008 (37 days ago) |
| Resolved | 04/05/2008 (37 days ago) |
| Attachments | groups.tgz ![]() sql.php ![]() |
| Milestone | |
| Patch | 1 |
Added a migration script similar to the perms one; also added sequence setting to both migration scripts so that nextId() doesn't result in collisions with the (probably pretty high) datatree ids that are preserved this way.
Works For Me (tm).
Thanks again.
> Works for me so far. It's all committed and merged - thanks! If you
> happen to have a migration script that'd be great, but it'd have to
> automatically update group ids in permissions also - tricky.
Unfortunately I don't have it.
By migrating even the DT id, updating permission would not be necessary.
> I'm changing group_uid in horde_groups_members to be an int, not a
> varchar - is that right?
yes
State ⇒ Resolved
Taken from
Assigned to Chuck Hagenbuch
Works for me so far. It's all committed and merged - thanks! If you happen to have a migration script that'd be great, but it'd have to automatically update group ids in permissions also - tricky.State ⇒ Assigned
Assigned to
This is committed, with some changes for params and such; everything but conf.xml. I'm hoping to work on this and the other SQL drivers tomorrow.I'm changing group_uid in horde_groups_members to be an int, not a varchar - is that right?New Attachment: sql.php
Fix adding member and removing group.
Now I am running it on my public server.
And a short test: Having 5 groups, each child of another, two users per group, groups cache enabled. Average of after 1000 runs.
Memory usage:
----
3,932,160 current data tree
3,407,872 sql2
----
500k less
Time in seconds
---
0,0060 dt
0,0041 sql
0,0035 sql2
script:
----
define('HORDE_BASE', dirname(__FILE__) . '/../');
require_once HORDE_BASE . '/lib/base.php';
require_once 'Horde/Group.php';
$s = &Group::factory('sql2');
$s->listGroups());
$s->getGroupMemberships('duck');
$s->getGroupMemberships('duck', true);
$s->userIsInGroup('duck', 85780, false);
$s->userIsInGroup('duck', 85780, true);
New Attachment: sql2.php
A little bit more optimized. It don't store all object in session objects but only the results as normal session indexed array and it not needs parents column as parents are already stored in group name.New Attachment: groups.tgz
Queue ⇒ Horde Framework Packages
Summary ⇒ Groups SQL driver
Type ⇒ Enhancement
Priority ⇒ 1. Low
State ⇒ New
Another attempt to move data out of DT to reduce time/memory usage. Acts the same as current DT groups driver just stores the data in two small dedicated tables.