Quadratic behavior with abusive ATTLISTs
Processing ATTLISTs with long names and many attributes has quadratic behavior. From a quick look, this is because we store attribute declarations in a single hash table, indexed by element name plus attribute name. Possible fixes:
- Store attribute declarations in a second-level hash table. Requires rewriting a lot of the DTD validation code.
- Severely limit length of element names in ATTLISTs.
- Use our existing amplification checks when processing ATTLISTs.
The last approach looks like the most attractive.