You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by 贾晓建 <jx...@cn.fujitsu.com> on 2009/01/08 04:35:13 UTC

How to use bucket more efficient?

Hello everyone!

     In the article Introduction to Buckets and
<http://www.apachetutor.org/dev/brigades>  Brigades, the author mentions 

“””Note that we created a new bucket every time we replaced a character.
Couldn't we have prepared four buckets in advance - one for each of the
characters to be replaced - and then re-used them whenever the character
occurred?

The problem here is that each bucket is linked to its neighbours. So if we
re-use the same bucket, we lose the links, so that the brigade now jumps
over any data between the two instances of it. Hence we do need a new bucket
every time. That means this technique becomes inefficient when a high
proportion of input data has to be changed. We will show alternative
techniques for such cases in other articles.

“””

But I did not find the “other articles” the author mentioned! Would anyone
please tell me where to find this article or how to do when we want to
improve the efficiency of using buckets in such situation?

 

Thanks a lot!

----------------------------------------------------------------------------
----------

贾晓建

E-mail:jxj@cn.fujitsu.com

TEL: (010)5969 1000(Ext.5733)  (010)5969 1582

 


Re: How to use bucket more efficient?

Posted by Nick Kew <ni...@webthing.com>.
On Thu, 8 Jan 2009 11:35:13 +0800
贾晓建 <jx...@cn.fujitsu.com> wrote:

> But I did not find the “other articles” the author mentioned! Would
> anyone please tell me where to find this article or how to do when we
> want to improve the efficiency of using buckets in such situation?

Two answers to that:
 1. The work that started out as articles at apachetutor got diverted
    into my book (see sig), so there are far fewer articles than I
    no doubt envisaged when I wrote that.
 2. You should probably look at
    http://httpd.apache.org/docs/trunk/developer/output-filters.html
    which is not by me, but is more recent/up-to-date than the
    article you mention.
    
-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/