
ilmari at ilmari
Feb 7, 2012, 5:44 AM
Post #4 of 5
(39 views)
Permalink
|
|
Re: [perl #107866] installhtml is unacceptably slow
[In reply to]
|
|
"Nicholas Clark via RT" <perlbug-followup [at] perl> writes: > On Tue Jan 10 12:00:27 2012, nicholas wrote: >> On Tue Jan 10 08:39:09 2012, nicholas wrote: >> > ./installhtml is now unacceptably slow. >> >> > On a fast Unix system, installhtml as of perl 5.14.0 was tolerable. >> > (About as >> > annoying as installman) >> > >> > On the same system, installman in smoke-me/installhtml (blead is >> > broken) > > I think that I meant "installhtml" there. > >> > took 36 minutes. >> >> Different machine, but also modern x86_64 Debian - 30 seconds vs 20 > minutes. > > As of commit b09e89a9fc6a3133 it's now about under 90 seconds on the > machine I tested, down from about 30 minutes, on the machine I tested. The cache key used for the file seems a bit overly strict: sub cache_key { my($dircache, $podpath, $podroot, $recurse) = @_; return join('!',$dircache,$recurse,@$podpath,$podroot,stat($dircache)); } stat() incldes the atime, which means that it'll invalidate the cache just because it hasn't been accessed in a while. Most of the fields returned by stat() are in fact unrelated to modifications of the contents: I'd go with just size and mtime. -- ilmari "A disappointingly low fraction of the human race is, at any given time, on fire." - Stig Sandbeck Mathisen
|