1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

started messing seriously with per-document dict and element and attribute

* SAX2.c parser.c parserInternals.c xmlreader.c: started messing
  seriously with per-document dict and element and attribute nodes
  reuse in the xmlReader. This seems to lead to an interesting
  speedup of the xmlReader already.
Daniel
This commit is contained in:
Daniel Veillard
2003-09-17 10:26:25 +00:00
parent 81514ba478
commit 9f7eb0bba3
5 changed files with 404 additions and 9 deletions

View File

@ -2383,6 +2383,26 @@ xmlFreeParserCtxt(xmlParserCtxtPtr ctxt)
xmlHashFree(ctxt->attsDefault, (xmlHashDeallocator) xmlFree);
if (ctxt->attsSpecial != NULL)
xmlHashFree(ctxt->attsSpecial, NULL);
if (ctxt->freeElems != NULL) {
xmlNodePtr cur, next;
cur = ctxt->freeElems;
while (cur != NULL) {
next = cur->next;
xmlFree(cur);
cur = next;
}
}
if (ctxt->freeAttrs != NULL) {
xmlAttrPtr cur, next;
cur = ctxt->freeAttrs;
while (cur != NULL) {
next = cur->next;
xmlFree(cur);
cur = next;
}
}
#ifdef LIBXML_CATALOG_ENABLED
if (ctxt->catalogs != NULL)