std.xml itself is known to be absurd. I haven't used it myself, but there's been a general consensus for years that it needs a complete rewrite. Attempts have been started, but nobody's finished one, AFAIK. You could try the XML module in Tango, it's supposed to be ridiculously fast.