Do a bit of bufferization in text mode, Daniel
diff --git a/HTMLparser.c b/HTMLparser.c
index a1fdac5..080b9ed 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -3527,7 +3527,8 @@
 	fprintf(stderr, "HPP: pushed %d\n", size);
 #endif
 
-        htmlParseTryOrFinish(ctxt, terminate);
+	if ((terminate) || (ctxt->input->buf->buffer->use > 80))
+	    htmlParseTryOrFinish(ctxt, terminate);
     } else if (ctxt->instate != XML_PARSER_EOF)
         htmlParseTryOrFinish(ctxt, terminate);
     if (terminate) {