[Yanel-dev] Performance Issue in YarepUser.getGroupIDs(true)

Michael Wechner michael.wechner at wyona.com
Thu Feb 9 14:23:42 CET 2012


Hi Balz

Am 08.02.12 21:00, schrieb basZero:
> Hi Michael,
> ok I'll do that.
> I wrote a little tool to generate 1000 users locally.

can you send this to me for testing?

Thanks

Michael
> Then you just need a resource which calls the method with 
> Boolean.TRUE, you'll see that it takes some seconds even without 
> hierarchical groups in place...
>
> Cheers
> Balz
>
> On Wed, Feb 8, 2012 at 8:23 PM, Michael Wechner 
> <michael.wechner at wyona.com <mailto:michael.wechner at wyona.com>> wrote:
>
>     Hi Balz
>
>     Am 08.02.12 14:47, schrieb basZero:
>>     Hi Michael,
>>     at the moment we do not have hierarchical groups, but we thought
>>     about it.
>>     So having a flat group structure, I was even more surprised about
>>     the time it takes.
>>
>>     So for the moment we are using getGroupIDs(false), this is very
>>     fast as it just fetches the groups from the user.xml .
>>
>>     My mail was rather to make you aware of it, in case you were not.
>
>     Inside the code of
>
>     https://github.com/wyona/security/blob/master/src/impl/java/org/wyona/security/impl/yarep/YarepUser.java
>
>     it has a TODO stating the implementation should be replaced, but
>     it doesn't say why and maybe the implementation was changed
>     already because it seems to have a version2 and hence the TODO
>     should be rather deleted.
>
>     I am happy to have a closer look at it, but it would help me if
>     you could provide me with sample data to reproduce the performance
>     issues which you are experiencing.
>
>     Thanks
>
>     Michael
>
>>
>>     Cheers
>>     Balz
>>
>>     On Tue, Feb 7, 2012 at 5:56 PM, Michael Wechner
>>     <michael.wechner at wyona.com <mailto:michael.wechner at wyona.com>> wrote:
>>
>>         Am 07.02.12 14:01, schrieb basZero:
>>>         dear all,
>>>
>>>         I observed a severe performance issue if you call the
>>>         getGroupIDs method with boolean TRUE (return also parent
>>>         groups):
>>>         - I have 1000 users locally installed
>>>         - I did a test with retrieving groups with parents: 1300ms
>>>         and once without parents: 1 to 2ms
>>>
>>>         1)
>>>         Did anybody use parent groups?
>>
>>         yes
>>
>>>         How did you solve this issue?
>>
>>         you mean the peformance issue?
>>
>>         I think this depends very much about the context, how the
>>         groups are being nested and how often one is calling this method.
>>
>>         In what context are you using it or rather what do you try to
>>         accomplish?
>>
>>>
>>>         2)
>>>         However: the difference from a performance point of view
>>>         seems a bit too distinct, maybe the code could be improved?
>>>         If there is a description somewhere, what
>>>         exactly YarepUser.getGroupIDs(true) should do,
>>
>>         See the javadoc at
>>
>>         src/core/java/org/wyona/security/core/api/User.java#getGroupIDs(boolean)
>>
>>         You might also have a look at
>>
>>         src/util/java/org/wyona/security/util/GroupUtil.java#getGroupIDs(Group,
>>         boolean)
>>
>>         HTH
>>
>>         Michael
>>
>>>         then I could take a look at the code and give my feedback on it.
>>>
>>>         Cheers
>>>         Balz
>>>
>>>
>>>
>>
>>
>>         --
>>         Yanel-development mailing list Yanel-development at wyona.com
>>         <mailto:Yanel-development at wyona.com>
>>         http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>
>>
>>
>>
>
>
>     --
>     Yanel-development mailing list Yanel-development at wyona.com
>     <mailto:Yanel-development at wyona.com>
>     http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wyona.org/pipermail/yanel-development/attachments/20120209/cba136a2/attachment.html>


More information about the Yanel-development mailing list