Quadratic behavior in streaming validation with huge text nodes
As mentioned in #515, xmlSchemaVPushText
uses a naive string concatenation algorithm, resulting in quadratic behavior:
% cat test.xsd
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<element name="d" type="string"/>
</schema>
% python3 -c 'print("<d>" + "x"*10000000 + "</d>")' |/usr/bin/time xmllint --sax --schema test.xsd - >/dev/null
- validates
3.64 real 3.59 user 0.01 sys
% python3 -c 'print("<d>" + "x"*20000000 + "</d>")' |/usr/bin/time xmllint --sax --schema test.xsd - >/dev/null
- validates
14.50 real 14.40 user 0.05 sys