octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59277] [octave-forge](io) xls2oct is slow whe


From: Dennis
Subject: [Octave-bug-tracker] [bug #59277] [octave-forge](io) xls2oct is slow when a spreadsheet contains many text cells
Date: Sun, 25 Oct 2020 08:09:15 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36

Follow-up Comment #24, bug #59277 (project octave):

An addition to my tests in comment #23:
I don't understand line 204 and 205. They are identical to L.197 and L.200
respectively, since L.202 reads idx.all = val(:, 1);

So, replacing lines 204 and 205 as follows may speed up things further:
idx.num = vi.row;
idx.alph = vi.alph;

Original:

ć²«Elapsed time is 61.076 seconds.
   #         Function Attr     Time (s)   Time (%)        Calls
---------------------------------------------------------------
  23           regexp            34.614      57.06           70
  32         cell2mat            10.380      17.11        20080
  13 __OCT_xlsx2oct__             3.510       5.79           10
  46       str2double             2.828       4.66           30
  26              cat             2.434       4.01        20090


Replaced L.204 and L.205:

ć²«Elapsed time is 40.6197 seconds.
   #         Function Attr     Time (s)   Time (%)        Calls
---------------------------------------------------------------
  23           regexp            19.325      48.00           50
  32         cell2mat             8.988      22.32        20060
  13 __OCT_xlsx2oct__             2.847       7.07           10
  24          cellfun             1.795       4.46       100350
  26              cat             1.629       4.05        20070


That seems to be useful some code cleaning :-)

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59277>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]