Re: [xslt] speeding up xslt in gtk-doc
- From: Stefan Kost <ensonic hora-obscura de>
- To: xslt gnome org
- Subject: Re: [xslt] speeding up xslt in gtk-doc
- Date: Fri, 06 May 2011 17:49:20 +0300
On 04.05.2011 12:18, Daniel Veillard wrote:
> On Wed, May 04, 2011 at 11:43:03AM +0300, Stefan Kost wrote:
>> On 03.05.2011 18:14, Stefan Kost wrote:
>>> hi,
>>>
>>> I am still not happy with the time it takes for gtk-doc to generate the
>>> html. I did some profiling and tired various changes. Its not too
>>> impressive. Just posting them here for feedback and comment on the
>>> directions of what would be acceptable or not. I technically have commit
>>> rights, so I can push things once they are ready. If patch 0002 looks
>>> like a good idea, I can extend it for other accessors.
>> Daniel, btw. are you fine with me pushing a couple of obvious patches
>> that only fix compiler warnings (like unused variables and missing
>> casts). I would do that for libxml2 and libxslt.
There are a lot of warnings like this:
ISO C90 does not support "long long"
ISO C forbids assignment between function pointer and 'void *'
not sure how you want to handle them.
Also tests have a few
ignoring return value of 'write', declared with attribute warn_unused_result
that could be taken care of if desired.
For
0006-xmlmemory-add-a-cast-size_t-has-no-portable-printf-m.patch
I would actually suggest to use "%lu" and (long unsigned) when using
that with a size_t.
Stefan
> Send them first please :-)
>
> Daniel
>
>From bbbeb50b4b0eda7cea1a019a877beda584b8b183 Mon Sep 17 00:00:00 2001
From: Stefan Kost <ensonic users sf net>
Date: Tue, 3 May 2011 17:23:39 +0300
Subject: [PATCH 4/4] xpath: trim trailing whitespace
---
xpath.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/xpath.c b/xpath.c
index a857590..d4db467 100644
--- a/xpath.c
+++ b/xpath.c
@@ -7669,7 +7669,7 @@ xmlXPathNextDescendantOrSelfElemParent(xmlNodePtr cur,
#ifdef LIBXML_DOCB_ENABLED
case XML_DOCB_DOCUMENT_NODE:
#endif
- case XML_HTML_DOCUMENT_NODE:
+ case XML_HTML_DOCUMENT_NODE:
return(contextNode);
default:
return(NULL);
@@ -12420,7 +12420,7 @@ apply_predicates: /* --------------------------------------------------- */
if ((predOp != NULL) && (seq->nodeNr > 0)) {
/*
* E.g. when we have a "/foo[some expression][n]".
- */
+ */
/*
* QUESTION TODO: The old predicate evaluation took into
* account location-sets.
@@ -12429,7 +12429,7 @@ apply_predicates: /* --------------------------------------------------- */
* All what I learned now from the evaluation semantics
* does not indicate that a location-set will be processed
* here, so this looks OK.
- */
+ */
/*
* Iterate over all predicates, starting with the outermost
* predicate.
--
1.7.1
>From 20da44a0d8c1cfbf963cde3825fbc66b513e0ddd Mon Sep 17 00:00:00 2001
From: Stefan Kost <ensonic users sf net>
Date: Fri, 6 May 2011 17:03:51 +0300
Subject: [PATCH 5/6] xpath: remove unused variable
As noted by gcc, this variable is not beeing used.
---
xpath.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/xpath.c b/xpath.c
index 0bb6f43..5258b3a 100644
--- a/xpath.c
+++ b/xpath.c
@@ -10030,7 +10030,6 @@ static void
xmlXPathCompNumber(xmlXPathParserContextPtr ctxt)
{
double ret = 0.0;
- double mult = 1;
int ok = 0;
int exponent = 0;
int is_exponent_negative = 0;
--
1.7.1
>From f3bf078327f038f3de29ca36897b3768ab340062 Mon Sep 17 00:00:00 2001
From: Stefan Kost <ensonic users sf net>
Date: Fri, 6 May 2011 17:40:10 +0300
Subject: [PATCH 6/6] xmlmemory: add a cast size_t has no portable printf modifier
---
xmlmemory.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/xmlmemory.c b/xmlmemory.c
index 433abb8..984aa82 100644
--- a/xmlmemory.c
+++ b/xmlmemory.c
@@ -205,7 +205,8 @@ xmlMallocLoc(size_t size, const char * file, int line)
if (xmlMemTraceBlockAt == ret) {
xmlGenericError(xmlGenericErrorContext,
- "%p : Malloc(%ld) Ok\n", xmlMemTraceBlockAt, size);
+ "%p : Malloc(%ld) Ok\n", xmlMemTraceBlockAt,
+ (long int)size);
xmlMallocBreakpoint();
}
@@ -273,7 +274,8 @@ xmlMallocAtomicLoc(size_t size, const char * file, int line)
if (xmlMemTraceBlockAt == ret) {
xmlGenericError(xmlGenericErrorContext,
- "%p : Malloc(%ld) Ok\n", xmlMemTraceBlockAt, size);
+ "%p : Malloc(%ld) Ok\n", xmlMemTraceBlockAt,
+ (long int)size);
xmlMallocBreakpoint();
}
@@ -349,7 +351,8 @@ xmlReallocLoc(void *ptr,size_t size, const char * file, int line)
if (xmlMemTraceBlockAt == ptr) {
xmlGenericError(xmlGenericErrorContext,
"%p : Realloced(%ld -> %ld) Ok\n",
- xmlMemTraceBlockAt, p->mh_size, size);
+ xmlMemTraceBlockAt, (long int)p->mh_size,
+ (long int)size);
xmlMallocBreakpoint();
}
p->mh_tag = MEMTAG;
--
1.7.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]