Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Is it File::Map issue, or another 'helpful' Perl regex optimization? (neither)

by Anonymous Monk
on Mar 18, 2017 at 00:04 UTC ( #1185092=note: print w/replies, xml ) Need Help??


in reply to Is it File::Map issue, or another 'helpful' Perl regex optimization?

Hi

Its neither,

That is to say, you can't tell what it is, or what its supposed to be

Consider https://metacpan.org/source/LEONT/File-Map-0.64/examples/fastsearch.pl, it uses https://metacpan.org/pod/File::Map#*-advise-$lvalue,-$advice

  • Comment on Re: Is it File::Map issue, or another 'helpful' Perl regex optimization? (neither)

Replies are listed 'Best First'.
Re^2: Is it File::Map issue, or another 'helpful' Perl regex optimization? (neither)
by vr (Friar) on Mar 18, 2017 at 00:15 UTC

    Adding advise( $s, 'sequential' ); made no difference :( - I mean, in terms of consumed memory.

      :)

      the module seems vague on claims and evidence, but ,

      I just did some testing, and I get these numbers just loading a 51mb file I create

      You'll need memusage-workingset-virtualmemory.pl to run it yourself

      So, when you map, seems to signal to the OS this is how big the memory usage is going to go (WVM field), and then the working set slowly increases up to the size of the file as the regular expression advances through the whole file "line" by line

      Is this faster than something else? More memory efficien? I dunno

      I'm beginning to suspect this is how File::Map is supposed to work

        Thank you, I'll digest this for a while

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1185092]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2018-01-23 05:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (238 votes). Check out past polls.

    Notices?