I've used Spreadsheet::ParseExcel::Stream instead of Spreadsheet::ParseExcel and it uses 1.0GB memory after parsing an xls-file with a single worksheet and 64772 rows and 120 columns. This is before I go through the parsed worksheets and rows.
Opening this in Excel (2007) seems to use only 230MB.
So even with this module, reading a somewhat large Excel file uses excessively large amounts of memory.
Edit: The xls-file is 122MB.
print("Before creating new Spreadsheet::ParseExcel::Stream:\n" . `free
+ -m`);
my $ExcelParser = Spreadsheet::ParseExcel::Stream->new($FileName);
print("After creating new Spreadsheet::ParseExcel::Stream:\n" . `free
+-m`);
results in
Before creating new Spreadsheet::ParseExcel::Stream:
total used free shared buffers cac
+hed
Mem: 3011 1250 1761 0 2
+177
-/+ buffers/cache: 1071 1940
Swap: 956 177 779
After creating new Spreadsheet::ParseExcel::Stream:
total used free shared buffers cac
+hed
Mem: 3011 2257 753 0 2
+177
-/+ buffers/cache: 2077 933
Swap: 956 177 779
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|