hey guys i have to read a huge xml file which consists of over 3 million records and over 10 million nested elements
naturally i am using xmltextreader and have got my parsing time down to about 40 seconds from earlier 90 seconds using multiple optimization tricks and tips
but i want to further save processing time as much as i can hence below question
quite a few elements are of type xs:boolean and the data provider always represents values as "true" or "false" - never "1" or "0"
for such cases my earliest code was:
if (xmlTextReader.Value == "true")
{
bool subtitled = true;
}
which i further optimized to:
if (string.Equals(xmlTextReader.Value, "true", StringComparison.OrdinalIgnoreCase))
{
bool subtitled = true;
}
i wanted to know if below would be fastest (because its either "true" or "false")?
if (xtr.value.length == 4)
{
bool subtitled = true;
}