Hi Frederik,<br><br><div class="gmail_quote">On Mon, Jul 4, 2011 at 6:44 AM, Frederik Ramm <span dir="ltr"><<a href="mailto:frederik@remote.org">frederik@remote.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
   when Osmosis writes temporary files, using the SimpleObjectStore, it uses a relatively primitive serialisation format and runs gzip on that. Given that we now have rather fast and effective OSM data storage with the PBF reader and writer, I wonder what it would take to switch from writing classic temp files to using (probably uncompressed) PBF as the temporary storage format.<br>

<br>
I've rummaged around in the code for a bit but at least it wasn't straightforward to do since the temporary storage code uses "containers" for everything whereas the PBF code doesn't.<br>
<br>
Do you reckon it would be easy to do, and can somebody (Brett? Scott?) outline what you think would have to be done? Then I'll have a go at implementing that.<br></blockquote><div><br>I'm not going to add much value here :-)<br>
<br>I suspect it will be challenging because the serialisation logic currently used is implemented within the classes actually being persisted.  For example, classes like SimpleObjectStore have no knowledge of the data types being persisted and simply get passed instances of Storeable.  You'll have to create some Entity stream specific storage classes.  You'll be limited to persisting Entity streams, but perhaps that is good enough to improve performance in the majority of cases.<br>
<br>Brett<br></div><br></div>