mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
- Release of 2.2.5 - xpointer.c: range() range-inside and other helper
- Release of 2.2.5 - xpointer.c: range() range-inside and other helper functions - parserInternals.c: fixed perf problem raised by rolf@pointsman.de Daniel
This commit is contained in:
@ -1025,6 +1025,12 @@ xmlParserInputShrink(xmlParserInputPtr in) {
|
||||
CHECK_BUFFER(in);
|
||||
|
||||
used = in->cur - in->buf->buffer->content;
|
||||
/*
|
||||
* Do not shrink on large buffers whose only a tiny fraction
|
||||
* was consumned
|
||||
*/
|
||||
if (in->buf->buffer->use > used + 2 * INPUT_CHUNK)
|
||||
return;
|
||||
if (used > INPUT_CHUNK) {
|
||||
ret = xmlBufferShrink(in->buf->buffer, used - LINE_LEN);
|
||||
if (ret > 0) {
|
||||
|
Reference in New Issue
Block a user