taoensso / nippy

The fastest serialization library for Clojure
https://www.taoensso.com/nippy
Eclipse Public License 1.0
1.04k stars 60 forks source link

Acceptable to freeze data that contains nested frozen data? #107

Closed stoeckley closed 6 years ago

stoeckley commented 6 years ago

I have been doing this without issue, but I often take a large seq of frozen items, and then freeze-to-file the seq, thereby actually freezing much of the data "twice." Such data then gets thawed twice before using. It's convenience to do so, but I wanted to double-check there are no gotchas with multiple passes of freezing and then multiple thaws.

ptaoussanis commented 6 years ago

@astoeckley Hi Andrew, this is no problem. After the first freeze, the data is just a byte array that can be frozen by Nippy as usual.

(Of course you're paying a certain amount of performance overhead for the data being frozen >once - shouldn't be a problem unless your use case is quite performance sensitive).

Hope that helps?

stoeckley commented 6 years ago

Thanks. I just needed to hear that there is nothing to worry about before I store large amounts of data indefinitely in this format.