help-gnats
[Top][All Lists]
Advanced

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

Re: fix for PR 219 - large PRs or updates take many minutes to process


From: Milan Zamazal
Subject: Re: fix for PR 219 - large PRs or updates take many minutes to process
Date: 30 Jul 2001 13:33:39 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.104

>>>>> "DB" == Dirk Bergstrom <address@hidden> writes:

    DB> 1) read sizeof(line)-1 chars from the message (<=1024 chars),
    DB> instead of sizeof(buf)-1 chars (2 chars).

    DB> 2) add code to keep track of buf's length in a variable, instead
    DB> of doing a strlen(buf) for every loop iteration.

    DB> the first fix gives a 20-30x improvement (from hours to minutes)
    DB> for a 1.4 MB testcase.  the second fix gave a 50x improvement
    DB> (five minutes to
    >> 10 seconds) for the same testcase.

    DB> and some cleanup:

    DB> xrealloc()ing buf in 4K chunks only when needed, instead of
    DB> every loop iteration.  doesn't seem to change speed, but it
    DB> feels better...

Thanks, Dirk, this is a very useful work!  I applied the patch with
minor changes.

Regards,

Milan Zamazal

-- 
Wasting somebody else's time strikes me as the height of rudeness.
                                                      Bill Gates


reply via email to

[Prev in Thread] Current Thread [Next in Thread]