s/optimization/"optimization"/; s/speed/a speed-up for rare uses and a slow-down for common uses of it/;

"use nlinks" should be something that is only done when requested and you should only request it if you are selecting files only based on the file name and you don't care if your code rather easily breaks in the face of all-too-common file systems that the File::Find maintainers still try to pretend don't matter much (and if the speed-up is that important to you). Using it otherwise actually makes File::Find run slower than it needs to.

Yes, I've notified p5p of these problems. But I gave up doing so many years ago. Yes, I realize that they now claim to auto detect when it would break things, but their previous (multiple) claims of safe auto detection were laughably incomplete (and I notified them of this) so I doubt (especially since we still get nodes like this) that the new detection is sufficient.

I particularly like "If you do set $File::Find::dont_use_nlink to 1, you will notice slow-downs". I notice speed-ups. But please, state it more forcefully and it will surely become true. (:

Now, the speed-up when only caring about file names (and only about suitably vanilla Unix file systems) is more significant than the speed-up I get by turning off their "optimization" for the more common uses of File::Find, so I'm not that surprised that some have formed an emotional attachment to it. But I've been burned by File::Find just plain not working so many times (I mostly stopped using it directly long ago but I still sometimes run into tools that try to use it) and I find my emotional attachment to wanting things to actually work to validly trump concerns of speed (especially since my way is faster most of the time anyway).

- tye        


In reply to Re^2: Issues with File::Find and Network Mounted Disks ("speed") by tye
in thread Issues with File::Find and Network Mounted Disks by gaspodethewonderdog

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.