Re: [jruby-dev] Removing COW from Array, with results

2011-10-26 Thread Thomas E Enebo
>From what I recall we did have one user who did have this problem and it was something like mail processing where all header lines got sliced from an array of the entire email and then retained... :) In this case, the COW leak was nearly impossible to understand until visually inspecting the lin

Re: [jruby-dev] Removing COW from Array, with results

2011-10-26 Thread Bob McWhirter
Typical case I've used it was to slice things for columnar display. I end up using the entire array, but just in N chunks of M items at a time. I don't recall ever taking a slice and discarding the rest. fwiw. -Bob On Oct 26, 2011, at 9:28 AM, Thomas E Enebo wrote: > Does anyone do

Re: [jruby-dev] Removing COW from Array, with results

2011-10-26 Thread Thomas E Enebo
Does anyone do a lot of sliciing (e.g. things like [1...100]) in their apps. Are they big arrays? Does anyone know a library which does? -Tom On Tue, Oct 25, 2011 at 6:46 PM, Charles Oliver Nutter wrote: > Long ago when the world was new, Marcin Mielzynski modified our Array > implementation t

[jruby-dev] Removing COW from Array, with results

2011-10-25 Thread Charles Oliver Nutter
Long ago when the world was new, Marcin Mielzynski modified our Array implementation to be copy-on-write like MRI. And there was much rejoicing. COW helps methods like slice and dup that would normally need to make a copy of all or part of the source array by wrapping the original array in "shared