Re: [opendemo-devel] Perfomance.
Status: Beta
Brought to you by:
girlich
From: Conor D. <co...@ma...> - 2002-01-07 09:28:47
|
Hello, ----- Original Message ----- From: "Dr. Uwe Girlich" <Uwe...@ph...> To: "OpenDemo Development List" <ope...@li...> Sent: Monday, January 07, 2002 1:22 AM Subject: Re: [opendemo-devel] Perfomance. > [...] > A ring-buffer would simply solve this bottleneck of constantly calling > fbGrow(), mbResize and memcpy() but we have 21 occurrences of mbGetBuffer(), > whose are not so easily converted to a ring-buffer. We need to know before > calling mbGetBuffer(), how many bytes should be available. Maybe this is > already done with the usually fbGrow() call before mbGetBuffer() but I'm not > really sure in all 21 cases. If you put the ring-buffer code in od_filebuf.c instead of od_membuf.c (or add a middle layer), then that shouldn't be a problem. The fb* interface does not provide direct access to the buffer, so changing from linear to ring buffers shouldn't require other changes. mbGetBuffer() just gives you the start of the memory block (same as any other ring-buffer). -Conor |