|
|
| No such thing as a small change | |
| PerlMonks |
Re^3: Split a file based on columnby davido (Bishop) |
| on Jan 17, 2013 at 06:11 UTC ( #1013714=note: print w/ replies, xml ) | Need Help?? |
|
Good job roboticus. I was thinking instead of some solution that would keep track of frequency of use for opened filehandles. Whenever 'open' fails due to too many files open, drop the least used handle. But I wasn't sure how to implement the frequency structure. A heap (priority queue) sounds good, except that it's probably relatively expensive to update the priority of a file handle each time it's used. Most heap implementations would just delete and re-insert the element being modified. Seems like there must be a solution that isn't prohibitively expensive, but I'm drawing a blank. There must be something on CPAN, but regardless, it would be nice to know how best to implement a...um... "priority cache"? ;) Dave
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||