posted 16 years ago
There are few definite answers in performance. It so often depends on context.
Generally, though, I'd expect properties to be faster than XML. The properties file format is simpler. Parsing it doesn't have as much set-up as parsing XML.
It would rarely be appropriate to base your design decision on this, though. Normally, choosing between properties and XML would depend on what types of system or person were going to be producing and consuming these files. For instance, properties is a Java-specific thing, whereas XML is universal. Also, XML is better at structured (particularly hierarchical) data, while properties is more for flat data.
Why is performance an issue for reading these files? Are you reading lots of them? Are you reading the same file frequently? If the latter, can you use caching?
Finally, your login name is a bit borderline for JavaRanch. We require at least two names (*not* initials) and they must be, or at least sound like, a real name. As it's borderline, that's all I'm saying, but changing your display name to something better would be appreciated. Later: I have been corrected - we do allow initials, though full names remain preferred.
[ July 03, 2007: Message edited by: Peter Chase ]
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.