The POSIX system on NT/Win2k allows the creation of hardlinks to files if the user doing the creation has Backup/Restore privs. Jan Dubois put a patch into win32 perl that allows perlfunc:link to create symbolic links using this feature. (That this is possible is poorly and confusingly documented, both by Microsoft and by ActiveState/Perl. For the latter you can find it documented in perlport)

One drawback of this however is that various attributes somehow dont propagate to the linked file unless its opened first (a caching bug apparently). So in order to cater for the 0.00000000000001 percent of the files out there that are hardlinks on Win32, perl was made to open and close every file it stats on that OS. :-(

Anyway, 5.10 will support the new var (which I had the honor of naming) which will disable this behaviour. And so hopefully will the next 5.8.x release. Along with using the newish sitecustomize.pl support you can set this variable to true for your perl and bypass this behaviour if you know it wont be a problem.

This should mean some signifigant speedups. According to Jan (who quite naturally beat me to an implementation for this) the new behaviour shows

The STRICT test uses 30-50% more wall clock time on a local NTFS system, 100% more against a Samba server and about 200% more against a Windows file server. This is very approximate, as times even on the local disk vary widely.

There are also JUNCTIONS on later NT/Win32 versions, but i dont think they cause stat a problem.

---
$world=~s/war/peace/g


In reply to Re^3: -s takes too long on 15,000 files by demerphq
in thread -s takes too long on 15,000 files by ishk0

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.