Board index » delphi » Q: Meaning of BufferChunks

Q: Meaning of BufferChunks

BufferChunks is the size (in records) in which the internal buffer get
incremented by.  For instance if BufferChuncks is 1000 and you are reading a
10,000 record dataset it would look like

  Open
  Allocate enough space internally for 1000 records
  read 1000 records
  try to read the 1001
  expand the internal buffer by another 1000 records
  ...

All BufferChunks is is a way to better tune your memory allocation vs memory
use.  If you have a small result set, drop that number so that you don't use as
much memory.  If you have large result sets you might want to increase it since
reallocating memory is a time expensive operation.

Quote
Jorrit Jongma wrote:

> Hello (again),

> - BufferChunks -

> How exactly is this used anyways? I understand it has something to do with
> buffering (duh). I thought this was used to store the result set, but if
> that were so, what would happen if the result set has more records than
> BufferChunks? This is why I think I have this totally wrong ... So please
> explain. Also, why is this set to 1000 by default ?? In the app I'm working
> on with some rather large record sizes and nr of records, memory use can
> rise with as much as 20 MB (!!) when you open a single dataset.... Since
> it's an MDI and you can have quite a few of these large datasets open at one
> time, you'll understand that memory usage is going through the roof. I've
> set it back to 32 which lowered total memory usage to 20 MB max in total,
> but what I really want to know is, when would I set which datasets to what
> value? (As in, a dataset which always only returns one record would be
> finetuned by setting this to 1 I suspect)

> Thanks in advance,

> Jorrit Jongma
> S-WARE
> sdan...@dds.nl

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
If there is somebody up there could they throw me down a line.  Just a
little helping hand just a little understanding.  Just some answers to the
questions that surround me now.  If there's somebody up there could
they throw me down a line.               (Fish)
 

Re:Q: Meaning of BufferChunks


Does this mean that if I have query returning 10,000 records and
BufferChunks = 1000 then all 10,000 records will be read anyway, even if I
don't show them up?

Sincerely Yours,
Jayhoon Haybatov

Jeff Overcash (TeamB) <overc...@onramp.net> wrote in message
news:38D8D361.8F81FB6C@onramp.net...
: BufferChunks is the size (in records) in which the internal buffer get
: incremented by.  For instance if BufferChuncks is 1000 and you are reading
a
: 10,000 record dataset it would look like
:
:   Open
:   Allocate enough space internally for 1000 records
:   read 1000 records
:   try to read the 1001
:   expand the internal buffer by another 1000 records
:   ...
:
: All BufferChunks is is a way to better tune your memory allocation vs
memory
: use.  If you have a small result set, drop that number so that you don't
use as
: much memory.  If you have large result sets you might want to increase it
since
: reallocating memory is a time expensive operation.
:

Quote
: Jorrit Jongma wrote:

: >
: > Hello (again),
: >
: > - BufferChunks -
: >
: > How exactly is this used anyways? I understand it has something to do
with
: > buffering (duh). I thought this was used to store the result set, but if
: > that were so, what would happen if the result set has more records than
: > BufferChunks? This is why I think I have this totally wrong ... So
please
: > explain. Also, why is this set to 1000 by default ?? In the app I'm
working
: > on with some rather large record sizes and nr of records, memory use can
: > rise with as much as 20 MB (!!) when you open a single dataset.... Since
: > it's an MDI and you can have quite a few of these large datasets open at
one
: > time, you'll understand that memory usage is going through the roof.
I've
: > set it back to 32 which lowered total memory usage to 20 MB max in
total,
: > but what I really want to know is, when would I set which datasets to
what
: > value? (As in, a dataset which always only returns one record would be
: > finetuned by setting this to 1 I suspect)
: >
: > Thanks in advance,
: >
: > Jorrit Jongma
: > S-WARE
: > sdan...@dds.nl
:
: --
: Jeff Overcash (TeamB)
:       (Please do not email me directly unless  asked. Thank You)
: If there is somebody up there could they throw me down a line.  Just a
: little helping hand just a little understanding.  Just some answers to the
: questions that surround me now.  If there's somebody up there could
: they throw me down a line.               (Fish)

Other Threads