Hi Curt, On 9 December 2011 01:11, Curt Nowak <[email protected]> wrote:
> Hi all, > > browsing through the code of Omsosis-Xml, I noticed lines like > > "inputStream = new FileInputStream(file);" > > both in the run() method of > org.openstreetmap.osmosis.xml.v0_6.FastXmlReader and > org.openstreetmap.osmosis.xml.v0_6.XmlReader. Maybe I'm overlooking things > but shouldn't that better be > > "inputStream = new BufferedInputStream(new FileInputStream(file));" ? > I'm surprised to see that to be honest. I could have sworn that I've spent hours testing out different combinations of IO buffer sizes. But it would have been around 4 years ago so I must be wrong :-) I think compressed streams do buffering anyway so perhaps that is enough when reading from compressed files, but doesn't explain non-buffered cases. I don't have an issue with changing it, but I'd like to see some performance testing first to make sure that buffering provides a performance improvement. Brett
_______________________________________________ osmosis-dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/osmosis-dev
