in reply to Re: Perl scripts slowing down towards end of file processing
in thread Perl scripts slowing down towards end of file processing

Script is running on a linux machine running perl 5.6.0
There are no complex 'data structures' to speak of, except a bunch of vars containing integers for counting, and a few with the text removed from the statement file using substr().
None of the text removed is over 30 bytes in length.
Each page is separated into an array (@page = split(/\n/, $page_contents)), the @page array contains 65 elements of less than 85 bytes (changes per page), and is overwritten each time we split() a new page.

Did I miss anything?
JP -- Alexander Widdlemouse undid his bellybutton and his bum dropped off --

  • Comment on Re: Re: Perl scripts slowing down towards end of file processing

Replies are listed 'Best First'.
(tye)Re: Perl scripts slowing down towards end of file processing
by tye (Sage) on Jul 14, 2001 at 00:36 UTC

    That behavior does sound like what happens when you start using too much memory (non-linear reduction in performance). So you should check the memory consumption of the process during different points in the run (for example, via the "ps" command).

    Some file systems can also get much slower when they get nearly full so that is another possibility to check.

    Another possiblity is that your total (virtual) memory consumption hasn't grown too high but that you are jumping around too much in memory such that your "working set" is too large to fit in the available RAM.

    But, yes, we are all just guessing.

    Nothing in your description rings alarms bells to me about where the memory usage would be growing.

            - tye (but my friends call me "Tye")