On Fri, 20 May 2016, OBones wrote:
Lukasz Sokol wrote:
On 20/05/16 09:40, Graeme Geldenhuys wrote:
On 2016-05-20 09:36, Graeme Geldenhuys wrote:
I think a “x percentage of capacity” increment is the way to go. eg: 5
or 10%
Scrap that idea. In hind sight, % increments is what is causing the
Lukasz Sokol wrote:
On 20/05/16 09:40, Graeme Geldenhuys wrote:
On 2016-05-20 09:36, Graeme Geldenhuys wrote:
I think a “x percentage of capacity” increment is the way to go. eg: 5
or 10%
Scrap that idea. In hind sight, % increments is what is causing the problem.
Regards,
Graeme
And actu
On 20/05/16 09:40, Graeme Geldenhuys wrote:
> On 2016-05-20 09:36, Graeme Geldenhuys wrote:
>> I think a “x percentage of capacity” increment is the way to go. eg: 5
>> or 10%
>
> Scrap that idea. In hind sight, % increments is what is causing the problem.
>
> Regards,
> Graeme
And actually wh
On 2016-05-20 09:36, Graeme Geldenhuys wrote:
> I think a “x percentage of capacity” increment is the way to go. eg: 5
> or 10%
Scrap that idea. In hind sight, % increments is what is causing the problem.
Regards,
Graeme
___
fpc-pascal maillist - f
On 2016-05-20 07:02, LacaK wrote:
> So second question is can TFPList.Expand be modified, that for large
> FCapacity will be used smaller increment ?
I think a “x percentage of capacity” increment is the way to go. eg: 5
or 10%
Regards,
Graeme
--
fpGUI Toolkit - a cross-platform GUI toolkit
What about to simply adjust Expand procedure like:
if FCapacity > 8*1024*1024 then IncSize := FCapacity shr 3
else if FCapacity > 128 then IncSize := FCapacity shr 2
else if FCapacity > 8 then IncSize := 16
else IncSize := 4;
SetCapacity(FCapacity + IncSize);
It does not solve your prob
In our previous episode, Michael Van Canneyt said:
> > But of course all datastructures based on a single array (and thus inviting
> > very large block allocations) are fundamentally flawed because of it in the
> > first place.
>
> Which is why I recommended going the SAX way and store data manual
On Fri, 20 May 2016, LacaK wrote:
As new nodes are appended TFPList.Expand is called
And there is:
if FCapacity > 127 then Inc(IncSize, FCapacity shr 2);
So if I have in list 1 000 000 items, then at once list is expanded by
250 000, which causes in one step out of memory
So my question
- Using SAX and not store the whole DOM in memory, and at the same time
use your own memory allocation routines for your structures.
Good idea. I was not aware of such option.
(Unfortunatelly all work and testing on application was done, so rewrite
is completelly is brrr ;-( )
Thanks for
As new nodes are appended TFPList.Expand is called
And there is:
if FCapacity > 127 then Inc(IncSize, FCapacity shr 2);
So if I have in list 1 000 000 items, then at once list is expanded by
250 000, which causes in one step out of memory
So my question is: can I somehow control increment c
On Fri, 20 May 2016, Marco van de Voort wrote:
In our previous episode, LacaK said:
As new nodes are appended TFPList.Expand is called
And there is:
if FCapacity > 127 then Inc(IncSize, FCapacity shr 2);
So if I have in list 1 000 000 items, then at once list is expanded by
250 000, which
On Fri, 20 May 2016, LacaK wrote:
Btw is there any limit for number of memory block, which can be requested
?
As far as my XML file has milions of nodes, may be that for each node is
created instance of TDOMNode class (or TDOMElement I do not know), which
in turn can cause that there is l
In our previous episode, LacaK said:
> As new nodes are appended TFPList.Expand is called
> And there is:
>if FCapacity > 127 then Inc(IncSize, FCapacity shr 2);
>
> So if I have in list 1 000 000 items, then at once list is expanded by
> 250 000, which causes in one step out of memory
> So m
Btw is there any limit for number of memory block, which can be
requested ?
As far as my XML file has milions of nodes, may be that for each node is
created instance of TDOMNode class (or TDOMElement I do not know), which
in turn can cause that there is large amount of relative small memory
b
14 matches
Mail list logo