• Kamil Trzciński's avatar
    Make constant-memory export serializer · 334a9775
    Kamil Trzciński authored
    This makes the serialization to be executed
    lazily, using memory-optimised approach,
    and being fast to recycle.
    
    The biggest benefit comes from the fact that
    storing full Hash of object serialization is expensive,
    as it also often results in holding original
    representations of objects.
    
    This solves that, by making batch serialization,
    that outputs exact raw JSON content to generated string.
    
    JSON generator is optimised to have efficient string
    appender, this makes use of that.
    334a9775
project_tree_saver.rb 2.3 KB