yes bucketsOption is public and immutable. and yes we are incurring
re-calculation. however this is reduce-side and i have found it to be
immaterial for performance, so i didnt bother serializing bucketsOption. at
the time i wrote that there was also some issue with serializing sorted
maps, but that has been resolved i think.

if you care about RT through serialization than i can add it to serialized
class. or to address that i can make bucketsOption private and change
equals etc.



On Mon, Mar 10, 2014 at 1:02 PM, ianoc <notifications@github.com> wrote:

> In algebird-core/src/main/scala/com/twitter/algebird/SpaceSaver.scala:
>
> > @@ -101,7 +101,7 @@ object SSMany {
> >    private def apply[T](capacity: Int, counters: Map[T, (Long, Long)], buckets: SortedMap[Long, Set[T]]): SSMany[T] =
> >      SSMany(capacity, counters, Some(buckets))
> >
> > -  private def apply[T](capacity: Int, counters: Map[T, (Long, Long)]): SSMany[T] =
> > +  def apply[T](capacity: Int, counters: Map[T, (Long, Long)]): SSMany[T] =
>
> But if this is for the purpose of serialization are we not potentially
> incurring a re-calculation overhead upon every ser/deser? Things won't
> necessarily RT through ser now? the field is a public parameter of the
> class?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/twitter/algebird/pull/289/files#r10438445>
> .
>