Use the tag instead of the namespace in the hash function. This reduces the number of compares quite a bit as there the data is better distributed.
Only create prefix and localName when needed.
Testing
Test work as before. Documents load without problems.