[xslt] improvement for xsltproc --timing



hi,

I get a lot of bashing for the slowness of gtk-doc and looked a bit into
the performances. As expected it spends most time in the xslt processing
when converting the docbook-xml to html/latex/...

I played with xsltproc --profile and could hack one problem
(l10.language) and now I am also looking at the xsltproc --timing output:
    Parsing stylesheet /home/ensonic/projects/gnome/gtk-doc/gtk-doc.xsl
took 2 ms
    Parsing document ./tester-docs-all3.xml took 1 ms
    Computing chunks...
    Writing intro.html for preface(intro)
    Writing Overview-building.html for chapter(Overview-building)
    Writing pt01.html for part
    Writing GtkdocObject.html for refentry(GtkdocObject)
    Writing GtkdocIface.html for refentry(GtkdocIface)
    Writing tester-GtkdocTypes.html for refentry(tester-GtkdocTypes)
    Writing main-api.html for chapter(main-api)
    Writing rn01.html for reference
    Writing object-tree.html for chapter(object-tree)
    Writing api-index-full.html for index(api-index-full)
    Writing api-index-deprecated.html for index(api-index-deprecated)
    Writing api-index-0-1.html for index(api-index-0-1)
    Writing api-index-0-5.html for index(api-index-0-5)
    Writing go01.html for glossary
    Writing pt02.html for part
    Writing index.html for book(index)
    Writing index.sgml for book(index)
    Writing tester.devhelp for book(index)
    Writing tester.devhelp2 for book(index)
    Applying stylesheet took 2075 ms
    Saving result took 0 ms

For this it would be cool if xsltproc could do some magic to apply
timestamps to output from libxslt/xsltutils.c:xsltMessage().  Ideally
the output would be:

0.00 2.00 Parsing stylesheet
/home/ensonic/projects/gnome/gtk-doc/gtk-doc.xsl took
2.00 1.00 Parsing document ./tester-docs-all3.xml
3.00 0.75  Computing chunks...
3.75 0.20  Writing intro.html for preface(intro)
...

first column timestamp and 2nd column, time since last timestamp. This
could help to profile stylesheets. I think it could be done by setting a
custom xsltSetGenericErrorFunc(). Then then I would also need to modify
the timer functions to add a snapshotTimer(), that works like
endTimer(), but does a begin=endtime before leaving.

Does that sound acceptable?

Stefan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]