<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Hang loading spreadsheet"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114251">bug 114251</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Priority</td>
           <td>medium
           </td>
           <td>high
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>erack@redhat.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Severity</td>
           <td>normal
           </td>
           <td>major
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Hang loading spreadsheet"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114251#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Hang loading spreadsheet"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114251">bug 114251</a>
              from <span class="vcard"><a class="email" href="mailto:erack@redhat.com" title="Eike Rathke <erack@redhat.com>"> <span class="fn">Eike Rathke</span></a>
</span></b>
        <pre>It hangs when threading is enabled, it "only" is slow when threading is
disabled.

Also, any input on sheet COST leads to a waiting time. The conditional
formatting is executed every time after input for each cell where it is applied
and that is visible (plus an extra row which unfortunately hits here because
the window freeze is just above the first row with a conditional format).

The slowness is gone if the commit mentioned above is "undone" by just
returning 1 in ScFormulaCell::GetWeight() as a test, thus not triggering a
group calculation as it is smaller than mnOpenCLMinimumFormulaGroupSize. In
this case, adding messages to the FormulaLogger (e.g,
aScope.addGroupSizeThresholdMessage() that even calls GetWeight() again) for
each cell a group was not executed is suboptimal..

The slowness is also related to the fact that each group is only 2 cells (rows
8 and 9) in each column and doing all group related setup and gathering values
is much more overhead than just calculating the cells.

The worst part then is the SoftwareInterpreter nonsense because it has no clue
about the semantics of ranges and implicit intersections (which this document
heavily uses) and the implications of arrays, and blindly replaces every range
encountered with an array, forcing calculations to array mode where they should
not, e.g. matrix divisions of entire columns just to pick one result element
and throw a million away.

Certainly the weight gathering should be reworked to not hit the threshold for
just a very few cells.

Even more necessarily the SoftwareInterpreterFunc::operator() needs to be
taught when to replace a range with an array and when not.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>