[Libreoffice-commits] core.git: Branch 'feature/perfwork5' - 2 commits - external/expat tools/source

Michael Meeks michael.meeks at collabora.com
Thu Nov 6 09:48:33 PST 2014


 external/expat/UnpackedTarball_expat.mk |    1 
 external/expat/expat-fastparse.patch    |   52 ++++++++++++++++++++++++++++++++
 tools/source/stream/strmwnt.cxx         |    2 +
 3 files changed, 55 insertions(+)

New commits:
commit 96e92be622ee45c963e607bbcae42972f1f13993
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Thu Nov 6 17:48:11 2014 +0000

    what happens if we turn off lockfile fsynching.
    
    Change-Id: Id43cf7545fa3a2433ef1f587735a7d667c710298

diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index 8989921..00ac953 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -186,11 +186,13 @@ sal_uInt64 SvFileStream::SeekPos(sal_uInt64 const nPos)
 
 void SvFileStream::FlushData()
 {
+#if 0
     if( IsOpen() )
     {
         if( !FlushFileBuffers(pInstanceData->hFile) )
             SetError(::GetSvError(GetLastError()));
     }
+#endif
 }
 
 bool SvFileStream::LockRange( sal_Size nByteOffset, sal_Size nBytes )
commit 8e407980b24e0d40eb9f5fa30ec31a6328f2f817
Author: Michael Meeks <michael.meeks at collabora.com>
Date:   Thu Nov 6 13:51:37 2014 +0000

    expat: faster parsing.
    
    Change-Id: Ie32131752f6aa0ccc7ddeab2e1f877fcb1ba84e7

diff --git a/external/expat/UnpackedTarball_expat.mk b/external/expat/UnpackedTarball_expat.mk
index 1ea97b5..3a3d3e1 100644
--- a/external/expat/UnpackedTarball_expat.mk
+++ b/external/expat/UnpackedTarball_expat.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,expat,$(EXPAT_TARBALL)))
 
 $(eval $(call gb_UnpackedTarball_add_patches,expat,\
 	external/expat/expat-2.1.0.patch \
+	external/expat/expat-fastparse.patch \
 ))
 
 # This is a bit hackish.
diff --git a/external/expat/expat-fastparse.patch b/external/expat/expat-fastparse.patch
new file mode 100644
index 0000000..f817dba
--- /dev/null
+++ b/external/expat/expat-fastparse.patch
@@ -0,0 +1,52 @@
+--- misc/expat/lib/xmlparse.c
++++ misc/build/expat/lib/xmlparse.c
+@@ -2713,6 +2713,8 @@
+   const XML_Char *localPart;
+ 
+   /* lookup the element type name */
++if (dtd->elementTypes.used > 0)
++{
+   elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str,0);
+   if (!elementType) {
+     const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
+@@ -2726,6 +2728,12 @@
+       return XML_ERROR_NO_MEMORY;
+   }
+   nDefaultAtts = elementType->nDefaultAtts;
++}
++else
++{
++  elementType = NULL;
++  nDefaultAtts = 0;
++}
+ 
+   /* get the attributes from the tokenizer */
+   n = XmlGetAttributes(enc, attStr, attsSize, atts);
+@@ -2786,7 +2794,7 @@
+       XML_Bool isCdata = XML_TRUE;
+ 
+       /* figure out whether declared as other than CDATA */
+-      if (attId->maybeTokenized) {
++      if (elementType && attId->maybeTokenized) {
+         int j;
+         for (j = 0; j < nDefaultAtts; j++) {
+           if (attId == elementType->defaultAtts[j].id) {
+@@ -2836,7 +2844,7 @@
+ 
+   /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
+   nSpecifiedAtts = attIndex;
+-  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
++  if (elementType && elementType->idAtt && (elementType->idAtt->name)[-1]) {
+     for (i = 0; i < attIndex; i += 2)
+       if (appAtts[i] == elementType->idAtt->name) {
+         idAttIndex = i;
+@@ -2991,7 +2999,7 @@
+     return XML_ERROR_NONE;
+ 
+   /* expand the element type name */
+-  if (elementType->prefix) {
++  if (elementType && elementType->prefix) {
+     binding = elementType->prefix->binding;
+     if (!binding)
+       return XML_ERROR_UNBOUND_PREFIX;
+Only in expat/lib: xmlparse.c~


More information about the Libreoffice-commits mailing list