Changes a function call in getUserGroups to only retrieve group ids instead of objects.
this change significantly improves performance when using owncloud with many groups, e.g. nested ldap hierarchy (1.2.840.113556.1.4.1941), since getUserGroups gets called in oc_share::getItems, which is needed for every page request.
in my particular case, it took more than 10s to load the calendar page and more than 6s to load the file page.
this was in an environment with 100 user groups (nested) per user. The performance was bad due to the following call stack:
self::getManager()->getUserGroups($user)
- getGroupObject() (executed for every group!)
- groupExists() (resulting in many ldap-requests)
since the groups are loaded from ldap, it is unnecessary to check whether the group exists or not.
add a function getUserGroupIds for retrieving group ids instead of group objects. this significantly improves performance when using many (nested) groups.
I use the term socket for any extension, either unix socket, or internet socket (port).
I check if the socket is all digits
* only integers 0 and larger would pass this test.
I then check if the string is less than or equal to the maximum port number.
By using "if($socket)" I make sure socket isn't false, empty, or the string '0'.
I don't believe I need to initialize $port because $port will always be set if $socket is true. Please show me if I am wrong here. Thanks
Sometimes MySQL decides to return the shares in the wrong order, but
some parts of the code seem to require the order to be known, at least
so that the parent shares come before the children shares.
This fix adds an ORDER BY clause to force the order by id.
adding auto increment/PK to table files_trash
adding PK to table ldap_user_mapping and ldap_group_members
adding PK to table ldap_group_mapping
truncate permissions table to allow smooth creation of primary key
adding unit test for creating an auto increment column on a table which already contains data
remove unneeded table files_trashsizes
fix unit test
no need to truncate *PREFIX*permissions
On Oracle adding auto increment columns is not working out of the box - Oracle migrations are to be done manually