Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: File extraction 2nd try

by AnomalousMonk (Archbishop)
on Jan 19, 2016 at 03:11 UTC ( [id://1153049]=note: print w/replies, xml ) Need Help??


in reply to File extraction 2nd try

Your "1st" try seems to be discussed here. Do a Super Search on "sliding window". This is the approach you're using in the OPed code, although the size of the window you're using is microscopic; it will work a lot better with a 100 MB - 1GB window, assuming 4GB system RAM.

The simplest approach is to do a regex search on the the entire file slurped into system memory, but this does not scale well for large files, "large" being in the range you mention, although this depends on your hardware; it would be a trivial approach on a system with, say, 8GB of system RAM.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-16 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found