Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^6: Splitting Apache Log Files

by cmm7825 (Novice)
on Apr 27, 2010 at 05:36 UTC ( [id://837030]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Splitting Apache Log Files
in thread Splitting Apache Log Files

I'm not sure the exact specs...but its a production server. I assume it has RAID and SCSI hardisks

Replies are listed 'Best First'.
Re^7: Splitting Apache Log Files
by BrowserUk (Patriarch) on Apr 27, 2010 at 05:57 UTC

    If precompiling the regex makes such a big difference, you might consider trying eliminating your inner loop over the regexes by combining them into a single regex.

    What if any difference it would make will depend on how close to IO bound you are, but starting the regex engine multiple times for each line is relatively expensive. Combining the regex so they capture the matched string and then using the captured text to look up the appropriate filehandle might achieve some savings.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://837030]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-18 00:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found