If I remember correctly, the spreadsheet reading modules load the data into memory by default. The data structure used to do this can be a fairly large hash, based on the options used. It appears that this particular module unzips the xlsx package into a temporary directory and then parses it into its own internal structure. Depending on the complexity of the formatting, parameters passed to the parser, amount of data in each row, and so on, this can be an expected behavior. If you are not in need of any of the formatting, you may want to try the ':just_the_data' flags from Spreadsheet::XLSX::Reader::LibXML, which (at least from my experience - and it may not be yours in this case) should speed things up significantly.

If you are getting this twice a month, how much time do you expect to shave off from the task per month, and is that time in an automated process critical? If you (not the machine, you) are spending the 2.5 hours on this task, let's run some numbers (based on xkcd://is it worth the time):

You can spend about 7 days to trim down the time you spend on this task.

If it is not your time being used, then you really should consider if this automation must run as fast as possible, or if it will be sufficient to spend machine and clock cycles to remove the manual process. Typically your time is worth much more than the computer's time.

Update: Also, profile the various parts of your application. Where is the hangup? Compilation, reading, converting the data, writing, memory allocation, disk I/O? Unless you know what is taking the most time, you are just throwing a handful of parts into the machine and hoping it fixes itself.

--MidLifeXis


In reply to Re: Convert XLSX to TSV and remove CRLF in cells by MidLifeXis
in thread Convert XLSX to TSV and remove CRLF in cells by bulrush

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.