bugGNU Octave - Bugs: bug #53391, [octave forge] (io) Memory...

 
 

bug #53391: [octave forge] (io) Memory overallocation in xlsread

Submitter:  None
Submitted:  Tue 20 Mar 2018 07:11:09 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  Fixed Assigned to:  philipnienhuis
Originator Name:  Peter Giles Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * other
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 20 Mar 2018 10:15:46 PM UTC, comment #2: 

Fixed here, together with a few stylistic adjustments:
http://hg.code.sf.net/p/octave/io/rev/55c06e26ced6

Philip Nienhuis <philipnienhuis>
Group Member
Tue 20 Mar 2018 07:59:17 PM UTC, comment #1: 

Good catch, thanks.
In addition other ctext references should be reviewed as well.

It may well be that such assignments are made elsewhere too, I'll have a look.

Philip Nienhuis <philipnienhuis>
Group Member
Tue 20 Mar 2018 07:11:09 PM UTC, original submission:  

io package version 2.4.8
module _OCT_xls2oct_.m
line 134 - this is within the code section that is marked with comment "## 2.B. Shared strings"

current code:
ctext = cell (numel (strings));

proposed code:
ctext = cell (numel (strings), 1);

From an inspection of the code that follows line 134, it appears that the only part of ctext that is actually used is the first column. The current code allocates a square matrix of size numel(strings), which allocates a factor of numel(strings) more memory than required. This causes the code to fail with out-of-memory error when reading spreadsheets of modest-to-large size.

I have tried the change noted above, and it works for the examples I have tried, but it has not been tested extensively.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-20 philipnienhuis StatusConfirmed Fixed
        Assigned toNone philipnienhuis
        Open/ClosedOpen Closed
    2018-03-20 philipnienhuis StatusNone Confirmed
        Release4.0.0 other
        Operating SystemMicrosoft Windows Any
    2018-03-20 mtmiller SummaryMemory overallocation in io package, function xlsread [octave forge] (io) Memory overallocation in xlsread

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code