[Yanel-dev] YarepGroupManager.getGroup() very slow with 5000+ users

basZero baszero at gmail.com
Thu Apr 26 17:32:50 CEST 2012


Hi,

I have noticed very poor performance (over 5 seconds) when using
group = YarepGroupManager.getGroup(groupid)

and above all
group.addMember(userObject) (this call is very slow!)

when having thousands of users.

1) YarepGroupManager.getGroup(groupid)

When looking at the code of getGroup(), it loops over ALL users and
verifies whether the user really exists and only adds it when it exists.

>From a performane point of view, I don't want the Yanel to verify the
existance of 10'000 XMLs.
Is there a way to speed this up? I would prefer the usage of JAXB (just
converting XML to Java or the other way round). Then, if you really need
verification of some items, you can loop over all items and do your logic.

2) group.addMember(userObject)
on my local laptop, this method took 5 seconds alone with 1000 users.

the code mainly does:
- first add the group to the user XML (which should be quick, did not
measure it yet)
- secondly the user id gets added to the group XML: here also
createConfiguration() gets called which loops over all items, I think this
is just too slow when not using a marshalling engine like JAXB.

What is your experience? What can I do?

Cheers
Balz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wyona.org/pipermail/yanel-development/attachments/20120426/a7eea96d/attachment.html>


More information about the Yanel-development mailing list