[interfacekit] Re: BString patch suggestion and some questions,too
- From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Mon, 03 Nov 2003 14:30:50 +0100 CET
"burton666@xxxxxxxxx" <burton666@xxxxxxxxx> wrote:
> > I'm not so sure, if that's a good idea. This will cause the
> > implementation to
> > doubly touch the new space in the cases where _GrowBy() and
> > _OpenAtBy() are
> > used, thus decreasing performance. In case of LockBuffer() it will
> > even be
> > worse, if the allocated size is far greater than the actually used
> > one.
> I'm also against initializing the new space to '\0'. BString isn't
> exactly fast in its
> allocations, so I don't think it's a good idea to slow it even more.
> One of the things I wanted to do is allocate memory in blocks (like
> BMallocIO,
> BRegion, or any sane class which deals which allocations), instead of
> every
> time the BString is truncated, or every time something is appended.
> Unfortunately,
> it isn't possible without breaking binary compatibility.
How about having a hashed string table as storage in the background, so
that equal strings will only be stored once? (not for R1, for sure)
Bye,
Axel.
- References:
- [interfacekit] Re: BString patch suggestion and some questions, too
- From: burton666@xxxxxxxxx
Other related posts:
- » [interfacekit] Re: BString patch suggestion and some questions,too
- » [interfacekit] Re: BString patch suggestion and some questions,too
- » [interfacekit] Re: BString patch suggestion and some questions,too
- » [interfacekit] Re: BString patch suggestion and some questions,too
- » [interfacekit] Re: BString patch suggestion and some questions,too
- [interfacekit] Re: BString patch suggestion and some questions, too
- From: burton666@xxxxxxxxx