Home > Archive > C# > August 2004 > xml versus string manipulation
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
xml versus string manipulation
|
|
|
| I've got a situation where I need to hold more segregated information
in a database than there are columns available to me (I can't change
the database structure unfortunately).
At the moment I'm putting the extra information into an XML string and
saving that to the database; When it's needed I parse the results with
the XMLDocument object.
I've got a sneaking suspicion that this might be a bit processor
intensive ;)
Has anyone got any thoughts as to whether the gains made in just
manipulating the string outweigh the handiness of having a dom of the
data available?
ben
| |
| Wiebe Hordijk 2004-08-17, 8:58 pm |
|
"ben" <ben@hyl.co.uk> schreef in bericht
news:5e6153b0.0408170435.25df67a3@posting.google.com...
> I've got a situation where I need to hold more segregated information
> in a database than there are columns available to me (I can't change
> the database structure unfortunately).
> At the moment I'm putting the extra information into an XML string and
> saving that to the database; When it's needed I parse the results with
> the XMLDocument object.
> I've got a sneaking suspicion that this might be a bit processor
> intensive ;)
> Has anyone got any thoughts as to whether the gains made in just
> manipulating the string outweigh the handiness of having a dom of the
> data available?
>
> ben
Hi Ben,
I would prefer to use XML because you need less code for parsing, which
increases maintainability. Test to see if you get performance problems. If
so, you can still choose to trade in maintainability for performance.
Generally, you don't want to solve performance problems that don't exist.
Regards,
Wiebe
| |
|
| "Wiebe Hordijk" <wiebehordijk@spamnot.hccnet.nl> wrote in message news:<41227eb4$0$764$3a628fcd@reader10.nntp.hccnet.nl>...
> Hi Ben,
>
> I would prefer to use XML because you need less code for parsing, which
> increases maintainability. Test to see if you get performance problems. If
> so, you can still choose to trade in maintainability for performance.
> Generally, you don't want to solve performance problems that don't exist.
>
> Regards,
> Wiebe
Thanks for the input Wiebe.
I have to say I'd agree about maintainability, it's a lot easier to do
a 'SelectSingleNode' than deal with a horrible knot of substrings.
Out of interest, would you recommend a performance testing tool?
|
|
|
|
|