On Thu, Sep 2, 2010 at 3:17 PM, Mark Phippard <markp...@gmail.com> wrote: > I would not be so sure. When you are dealing with a GUI, adding a > handful of milliseconds to something that is going to be done > thousands of times can add up to less responsiveness.
I did some micro-benchmarks and the URI class does not perform too badly -- although it is clearly slower. I did a loop to construct a million objects and see how long it took: String class: 0.417 URI class: 3.968 I then took the loop and added a call to a method that took a String and just did a couple of simple checks of the String to make sure the compiler was not optimizing away any problems. That gives: String class: 0.455 URI class: 4.003 That said, in this example, if this were someone retrieving History entries that would be 4 more seconds added to the UI wait. Granted it might have been a minute or more to get these million entries from the server, but it is still added time. -- Thanks Mark Phippard http://markphip.blogspot.com/