W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2006

HTRDF.c parser performance improvement

From: Brown, David <David.Brown@slecs.ca>
Date: Fri, 3 Feb 2006 11:44:15 -0500
Message-ID: <956790249DB95A44BCAF592F57BDB97D12028A@sl-ecs-mail-01.slecs.ca>
To: <www-lib@w3.org>
Good day,

I've been using the libwww HTRDF component for parsing files. I made a
recent change (diff of HTRDF.c output below) that has improved the
parsing process. In my case, parsing time went from 74 minutes to 4
minutes on a file with a 300K elements. I am not an official hacker and
do not have write access to the CVS repository. So I offer my
contribution via this email. The fix is based on the latest HTRDF.c
file. I attached the updated HTRDF.c file for your revision. Assuming
this is 'hacker approved', can someone put this into the CVS repository?

Regards,

David Brown

 

>     HTList *                  m_lastChild;
233a235
>       me->m_lastChild = me->m_children;
253a256
>       me->m_lastChild = me->m_children;
293c296,303
<     return (me && element) ? HTList_appendObject(me->m_children,
element) : NO;
---
>     if (me && element) {
>       HTList *lastChild;
>       if ((lastChild = HTList_addList(me->m_lastChild, element))) {
>         me->m_lastChild = lastChild;
>       return YES;
>       }
>     }
>     return NO;






Received on Friday, 3 February 2006 22:31:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:45 GMT