<div dir="ltr">Hi Michael,<div><br></div><div>I found the root cause for the very poor performance!</div><div>As you know of course, the user's passwords are encrypted and generated with the newly introduced bcrypt algorithm.</div><div><br></div><div>When I did the upgrade to the latest Yanel version I was aware of this upgrade, however I somehow assumed that the password-update in the user XML would only be updated at LOGIN or when the user XML gets saved.</div><div><br></div><div>My assumption was wrong.</div><div><br></div><div>In the YarepUser.java class file I see in the constructor, that for each user object that gets created (even if it is created for read-only purposes), it is checked whether the password is stored in another format than bcrypt, and if so, the new password hash gets generated. And THIS consumes TIME!</div><div><br></div><div>Code Line:</div><div>upgradeDoubleHash(this.hashedPassword, this.hashingAlgorithm);<br></div><div><br></div><div>I think it is a very bad approach to put that logic in the constructor, because reading an object means that you want to get an object as represented by a stored XML.</div><div><br></div><div>A better way would be to put the logic into the save-logic of a user, because then it makes sense to store the new hashed password.</div><div><br></div><div>What do you think?</div><div><br></div><div>I will now code a workaround and let you know where I put it. </div><div><br></div><div>Cheers, Balz</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 11, 2016 at 7:49 PM, 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi Balz<br>
      <br>
      I am currently on vacation (until August 17th), but what you
      describe sounds really not good at all.<br>
      <br>
      I will have a look at it as soon as I will be back. Please keep us
      posted in case you find something out in the meantime.<br>
      <br>
      Thanks<br>
      <br>
      Michael<br>
      <br>
      Am 11.08.16 um 09:59 schrieb basZero:<br>
    </div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">
        <div>Hi,</div>
        <div><br>
        </div>
        <div>please read this with high priority as it could be very
          critical to performance of Yanel with many users:</div>
        <div><a href="https://github.com/wyona/security/issues/6" target="_blank">https://github.com/wyona/<wbr>security/issues/6</a><br>
        </div>
        <div><br>
        </div>
        <div>Cheers, Bas</div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
    </blockquote>
    <br>
  </div></div></div>

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