in reply to Re^2: Split a file based on column
in thread Split a file based on column
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Split a file based on column
by roboticus (Chancellor) on Jan 17, 2013 at 11:35 UTC | |
Re^4: Split a file based on column
by Anonymous Monk on Jan 17, 2013 at 10:56 UTC | |
by davido (Cardinal) on Jan 17, 2013 at 18:04 UTC | |
by Anonymous Monk on Jan 18, 2013 at 00:59 UTC |