[OSM-dev] Osmosis enableDateParsing

Jochen Topf jochen at remote.org
Sun Jan 11 08:49:40 GMT 2009


On Fri, Jan 09, 2009 at 11:31:03PM +1100, Brett Henderson wrote:
> Jochen Topf wrote:
>> On Thu, Jan 08, 2009 at 09:29:50PM +1100, Brett Henderson wrote:
>>   
>>> Jochen Topf wrote:
>>>     
>>>> On Thu, Jan 08, 2009 at 12:06:59PM +1100, Brett Henderson wrote:
>>>>         
>>>>> 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.
>>>>>             
>>>> So can we get rid of the option?
>>>>         
>>> It is still useful if the input file doesn't include timestamps.  I  
>>> remember somebody using that recently.  I'll add a comment to the 
>>> wiki to let people know it isn't useful for speed any more.
>>>     
>>
>> Shouldn't Osmosis be able to see by itself that there is no timestamp to
>> parse in that case?
>>   
> A timestamp is required by most downstream tasks.  Osmosis could detect  
> a missing timestamp but then it would have to invent one.  I'd prefer to  
> play it safe than do something unexpected like that.  But I don't care  
> strongly about it.

Why invent one? Wouldn't it just be "null"? All jobs, of course, must
handle this case gracefully. But they should anyway check their input. And
if they can absolutely not work without a timestamp, they can throw an
exception.

I don't see what the timestamp parsing option can add. Either there is a
timestamp or there isn't. The option can't influence that.

Jochen
-- 
Jochen Topf  jochen at remote.org  http://www.remote.org/jochen/  +49-721-388298





More information about the dev mailing list