OK, so here's an interesting tidbit. I tried out your modifications to my WEED() sub, and it wound up doubling the time it took to run! Weird. Heres the (truncated) dprof output of my original sub:
Total Elapsed Time = 1135.701 Seconds User+System Time = 770.4718 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 63.8 491.8 491.86 1 491.86 491.86 main::WEED 32.5 251.1 251.10 22012 0.0114 0.0114 main::SEARCHFASTA 2.10 16.20 16.209 164 0.0988 0.0988 main::GET_TEXT 0.71 5.460 5.460 1 5.4600 5.4600 main::INDEX_FASTA 0.40 3.089 3.089 164 0.0188 0.0188 main::ADD_SPAN 0.15 1.140 1.140 1 1.1400 1.1400 main::WEEDNUM (......)

And here's the output with the modifications you suggested:

Total Elapsed Time = 1292.196 Seconds User+System Time = 1200.096 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 76.9 923.0 923.08 1 923.08 923.08 main::WEED 20.6 247.6 247.61 22012 0.0112 0.0112 main::SEARCHFASTA 1.30 15.57 15.579 164 0.0950 0.0950 main::GET_TEXT 0.60 7.240 7.240 1 7.2400 7.2400 main::INDEX_FASTA 0.17 2.059 2.059 164 0.0126 0.0126 main::ADD_SPAN 0.14 1.729 3.848 1 1.7292 3.8483 main::HTML_FORMAT (......)

So, I am guessing that the grep wound up being less efficient than the 'band pass' filter I had set up. Weird. That said, I have not yet tried a combination of our two different methods. I have a feeling most of your comments are going to wind up helping, but that in this case, the nature of the data just lends itself better to the filter approach.

I hope that I can still shed significant time off of this sub, so I'll post it to the "Seekers of Perl Wisdom" forum for additional help.

Thank you so much though for taking the time to try and help me fix this. I really appreciate it.

Matt


In reply to Re^6: Refactoring a large script by mdunnbass
in thread Refactoring a large script by mdunnbass

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.