I've created a perl script automatically based on an ini file (we want to replace the ini file holding a number of rules by regular expressions in a perl script). The ini file is rather long, and the generated perl code is 22000 (approximate) lines long, holding about 8370 regex's. On my 1 GHz Pentium processor with 256 MB ram, it takes about 90 seconds to parse this file...(it is called from within a C++ program, but once it is parsed, the function call itself takes no time whatsoever) 90 seconds is (much much much) too long. Is there any possibility to save a parsed file (it never changes) in some format so that when it is needed (and loaded at program startup),it should not be parsed anymore, and thus load faster? Thx already, Wim

In reply to Saving parsed perl for faster loading? by wimpie

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.