<div class="gmail_extra">Hi Michael,</div><div class="gmail_extra"><br></div><div class="gmail_extra">sounds like a plan.</div><div class="gmail_extra">First I will try to find a very simple workaround (e.g. by not storing the member ids anymore in the group XML), as I think that most functionality is not needing that, am I wrong? I think it is enough just to have the group definitions in group XML and have the group assignments in the user XML only. </div>
<div class="gmail_extra"><br></div><div class="gmail_extra">But to be clear: the above description is not the final solution :)</div><div class="gmail_extra"><br></div><div class="gmail_extra">Yes we can work together on this.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Please also have a look at the pending pull requests which I posted 5 months ago, would be cool to have them finally in so that I can remove all custom Yanel classes again...</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Cheers</div><div class="gmail_extra">Balz<br><br><div title="signature"> </div><div class="gmail_quote">On Fri, Apr 27, 2012 at 9:25 AM, Michael Wechner <span dir="ltr"><<a href="mailto:michael.wechner@wyona.com" target="_blank">michael.wechner@wyona.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Balz<br>
    <br>
    Am 26.04.12 17:32, schrieb basZero:
    <div><div class="h5"><blockquote type="cite">Hi,
      <div><br>
      </div>
      <div>I have noticed very poor performance (over 5 seconds) when
        using</div>
      <div>group = YarepGroupManager.getGroup(groupid)</div>
      <div><br>
      </div>
      <div>and above all </div>
      <div>group.addMember(userObject) (this call is very slow!)</div>
      <div><br>
      </div>
      <div>when having thousands of users.</div>
      <div><br>
      </div>
      <div>1) YarepGroupManager.getGroup(groupid)</div>
      <div><br>
      </div>
      <div>When looking at the code of getGroup(), it loops over ALL
        users and</div>
      <div>verifies whether the user really exists and only adds it when
        it exists.</div>
      <div><br>
      </div>
      <div>From a performane point of view, I don't want the Yanel to
        verify the existance of 10'000 XMLs.</div>
      <div>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.</div>
      <div><br>
      </div>
      <div>2) group.addMember(userObject)</div>
      <div>on my local laptop, this method took 5 seconds alone with
        1000 users.</div>
      <div><br>
      </div>
      <div>the code mainly does:</div>
      <div>- first add the group to the user XML (which should be quick,
        did not measure it yet)</div>
      <div>- 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.</div>
      <div><br>
      </div>
      <div>What is your experience?</div>
    </blockquote>
    <br></div></div>
    I have the same experience, whereas it depends on how you use these
    classes. Also these were not built<br>
    for performance, but for functionality. Whereas this shall be no
    excuse, but just an explanation.<br>
    <br>
    I completely agree that we need to improve this with the intention
    that these implementations should scale<br>
    for millions of users and groups.<br>
    <blockquote type="cite">
      <div> What can I do?</div>
    </blockquote>
    <br>
    Do your own implementation of the group manager and configure it
    inside your realm.xml configuration, e.g.<br>
    <br>
    <ac-identities
    class="com.zwischengas.wyona.security.impl.IdentityManagerFactoryImpl"
    xmlns:zg=<a href="http://www.zwischengas.com/wyona/security1.0.0" target="_blank">"http://www.zwischengas.com/wyona/security1.0.0"</a>><br>
    ...<br>
    <br>
    whereas in order to save time you might want to derive all the
    classes from Yarep which work and just overwrite<br>
    the implementations which don't scale well.<br>
    <br>
    Even better, you create a "pull branch" such that you and I can work
    together and I will be happy to help you on this,<br>
    because I also need such an implementation shortly.<br>
    <br>
    We could call it org/wyona/security/impl/yarep2<br>
    <br>
    or whatever<br>
    <br>
    WDYT?<br>
    <br>
    Thanks<br>
    <br>
    Michael<br>
    <blockquote type="cite">
      <div><br>
      </div>
      <div>Cheers</div>
      <div>
        Balz</div>
      <div title="signature"> </div>
      <br>
      <fieldset></fieldset>
      <br>
    </blockquote>
    <br>
  </div>

<br>--<br>
Yanel-development mailing list <a href="mailto:Yanel-development@wyona.com">Yanel-development@wyona.com</a><br>
<a href="http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development" target="_blank">http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development</a><br></blockquote></div><br></div>