<div dir="ltr">I think this sounds great! The one suggestion I would make is to try to break this down into as many discretely testable bug reports a possible. The smaller each testable unit is, the more easily tested and qa'd it is.<div><br></div><div>Kyle</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><a href="https://secure2.convio.net/cffh/site/Donation2?df_id=1395&FR_ID=4715&PROXY_ID=2706639&PROXY_TYPE=20&1395.donation=form1&s_src=CHORUS&s_subsrc=CHAADOEB" target="_blank"><img src="http://widgets.ch-or.us/badge/convio/cff/4715/2706639"></a><br></div><div><br></div><div><a href="http://www.kylehall.info" target="_blank">http://www.kylehall.info</a><br>ByWater Solutions ( <a href="http://bywatersolutions.com" target="_blank">http://bywatersolutions.com</a> )<br>Meadville Public Library ( <a href="http://www.meadvillelibrary.org" target="_blank">http://www.meadvillelibrary.org</a> )<br>Crawford County Federated Library System ( <a href="http://www.ccfls.org" target="_blank">http://www.ccfls.org</a> )<br></div></div></div></div></div></div>
<br><div class="gmail_quote">On Thu, Jul 21, 2016 at 3:30 PM, Philippe Blouin <span dir="ltr"><<a href="mailto:philippe.blouin@inlibro.com" target="_blank">philippe.blouin@inlibro.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><span class="">
    On 07/21/2016 02:23 PM, Tomas Cohen Arazi wrote:<br>
    <blockquote type="cite">
      <div dir="ltr">I'm all for speed improvements. But:
        <div>- A clear backwards-compatible upgrade path needs to be set
          and written.</div>
      </div>
    </blockquote></span>
    Our curent script takes the content of the "old" tables to create
    the new one.  Past and future.  Is that what you mean?<br>
    More so, I've split the work in 8 theoretical steps.  But I think it
    could be considered to offer both ways in parallel: just add the new
    DB table, slowly transfer the calls to the new library.  Just make
    sure the new table is populated on any call to modify the "old
    ones".<span class=""><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>- I think (because of the speed improvement) that you are
          realying more on the DB features, this needs to be discussed
          if it can cause trouble.</div>
      </div>
    </blockquote></span>
    Actually, that's the serious point: we're going simple SELECTs the
    old way.  With no cache or anything right now.  It's not the fact
    that the code is cut by 80% or anything (although it would be). 
    It's just that much faster to do date calculations using the DB than
    Perl's DateTime.  Something like...<br>
    <br>
    SELECT COUNT(*) FROM discrete_calendar WHERE (date BETWEEN ? AND ?)
    AND (isopen=1)<br>
    <br>
    Add in opening and closing hours and it's golden.  Easily hashable
    and cachable as well.<span class=""><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>- The less you change the API, the easier is to spot
          regressions for the current blacklist-like implementation of
          the calendar. Tests could be adjusted, but it'd be interesting
          to have the current tests pass.</div>
      </div>
    </blockquote></span>
    I agree.  I admit I do not have a clear plan, and I know without
    perfect test coverage, this stands no chance.  More so, wasting
    perfectly valid old tests is... a waste.<br>
    <br>
    But again, I'm throwing a line.  I want to see if others beside us
    see a need.  I want to see if someone is already working on
    something that would conflict, etc...<br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Regards</div>
      </div>
    </blockquote>
    Thanks a lot for the feedback!<div><div class="h5"><br>
    <br>
    <blockquote type="cite"><br>
      <div class="gmail_quote">
        <div dir="ltr">El jue., 21 jul. 2016 a las 13:43, Philippe
          Blouin (<<a href="mailto:philippe.blouin@inlibro.com" target="_blank">philippe.blouin@inlibro.com</a>>)
          escribió:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div text="#000000" bgcolor="#FFFFFF"> Hi!<br>
            <br>
            I'm throwing a line here, and I'd just like to get a feel
            for the value of offering some work to the community.  Mind
            you, the work is "big" so honest responses could save us lot
            of wasted hours.<br>
            <br>
            We've developed a parallel calendar table to specify each
            individual day if it's opened or not (instead of rules and
            exception).  We added to it the opening hours, and keep a
            year of them in the past, and a year in the future.<br>
            The reasonning being:<br>
            - We need the opening hours.  They need to vary season to
            seasons.  We need them for hourly and minute loans.<br>
            - Exception and holidays and etc... are complicated.  To
            manage, to calculate, to fix.  We need the past info as
            well, to calculate precisely.<br>
            - Performance.  Calculating with C4/Koha Calendars is
            sloooooooooow.  Our little table cut <a href="http://fines.pl" target="_blank">fines.pl</a> calculation times by 97%. 
            Not a typo.  Checkout improvement by 30-60% but metric is
            unreliable so take with grain of salt this one.<br>
            <br>
            So before I go and write a wiki RFC, then open bugzillas,
            make the code community acceptable (we're not using
            Schemas), complete it, write tests, etc...  Is there an
            interest?  Would it answer a need (outside of our clients)
            ?  Maybe a subset?  <br>
            <br>
            All comments, suggestions, questions are welcomed.<br>
            <br>
            High regards,<br>
            <br>
            <div>
              <div>
                <div> <span>Philippe Blouin,</span><br>
                  <span>Responsable du développement informatique</span><br>
                  <p> Tél.  : <a href="tel:%28888%29%20604-2627" value="+18886042627" target="_blank">(888) 604-2627</a><br>
                    <a href="mailto:philippe.blouin@inLibro.com" target="_blank">philippe.blouin@inLibro.com</a> </p>
                </div>
                <div> <span>in</span><span>Libro</span> <span>| pour
                    esprit libre |</span> <a href="http://www.inLibro.com" target="_blank">www.inLibro.com</a>
                </div>
              </div>
            </div>
            <br>
          </div>
          _______________________________________________<br>
          Koha-devel mailing list<br>
          <a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
          <a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
          website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
          git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
          bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a></blockquote>
      </div>
      <div dir="ltr">-- <br>
      </div>
      <div data-smartmail="gmail_signature">
        <div dir="ltr">
          <div>Tomás
            Cohen Arazi</div>
          <div>Theke
            Solutions (<a href="http://theke.io/" target="_blank">https://theke.io</a>)<br>
            ✆ <a href="tel:%2B54%209351%203513384" value="+5493513513384" target="_blank">+54 9351 3513384</a><br>
            GPG: B2F3C15F</div>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a><br></blockquote></div><br></div>