[OSM-dev] Osmosis enableDateParsing

Brett Henderson brett at bretth.com
Thu Jan 8 01:06:59 GMT 2009


I might have to double check to make sure the parameter is working 
correctly :-)

However it should be very fast now.  I recently implemented a change to 
keep the date as a string internally (I thought I sent you an email 
about this, could be wrong).  If it is written to xml again the previous 
date string is used unchanged.  If it is written to something like a 
database then the string will be parsed when it is required.  Even if 
parsing does occur, the custom code used internally is orders of 
magnitude faster than standard java xml date parsing classes.  It is the 
same code I submitted for JOSM though so has been around for some time now.

Frederik Ramm wrote:
> Hi,
>
>     I played around with the enableDateParsing option and found:
>
> $ time osmosis --rx testfile.osm enableDateParsing=yes --wx out.osm
> Jan 8, 2009 1:12:50 AM com.bretth.osmosis.core.Osmosis main
> INFO: Osmosis Version 0.29
> [...]
> Jan 8, 2009 1:13:10 AM com.bretth.osmosis.core.Osmosis main
> INFO: Pipeline complete.
>
> real    0m20.456s
> user    0m19.420s
> sys     0m1.290s
> $
>
> $ time osmosis --rx testfile.osm enableDateParsing=no --wx out.osm
> Jan 8, 2009 1:16:55 AM com.bretth.osmosis.core.Osmosis main
> INFO: Osmosis Version 0.29
> [...]
> Jan 8, 2009 1:17:15 AM com.bretth.osmosis.core.Osmosis main
> INFO: Pipeline complete.
>
> real    0m20.061s
> user    0m20.460s
> sys     0m0.930s
> $
>
> How can this be explained? I would have expected a significant, or at 
> least noticeable, difference between running with and without date 
> parsing! (I tried "enableDateParsing=foobar" just to make sure Osmosis 
> recognizes the option, and it does complain that foobar is not a yes/no 
> value...)
>
> Bye
> Frederik
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>   





More information about the dev mailing list