2011/12/2 Martin Dias <tinchod...@gmail.com>: > Hi folks > > In Fuel, we serialize a block closure with its state, including its > outerContext. This enables to serialize a sorted collection with its > sortBlock: > > | bytes result | > bytes := FLSerializer serializeToByteArray: (SortedCollection sortBlock: [:a > :b | a > b ]). > result := FLMaterializer materializeFromByteArray: bytes. > result > addAll: #(1 2 3); > yourself. > ---> a SortedCollection(3 2 1) > > Here the problem: the byte array is huge! (800kb) because we are serializing > unneeded context for the sort block. > > We wonder how to prune it and save time and space. > > Thanks in advance > Martín
In the case of such clean block, there is no need of outer context during block execution. However I don't know if implementation makes it possible to ignore the context... That's more a question directed to Eliot ;) Nicolas