Board index » delphi » Slowliness while closing the ClientDataSet

Slowliness while closing the ClientDataSet

Hi folks!

In the OnClose event of my form I call the method Close of a TClientDataSet,
but it takes too much time (about 15 seconds) to close a query with just 5
records! Is it a DbExpress bug ?? Is there any property or any cares I
should take before close the ClientDataSet ?

Best regards,

Rodrigo A. de Freitas

 

Re:Slowliness while closing the ClientDataSet


Try setting DSP.Option poNoReset to True and see if that cures the problem.

--
Dave Rowntree
"Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
news:3d18a3c8_2@dnews...

Quote
> Hi folks!

> In the OnClose event of my form I call the method Close of a
TClientDataSet,
> but it takes too much time (about 15 seconds) to close a query with just 5
> records! Is it a DbExpress bug ?? Is there any property or any cares I
> should take before close the ClientDataSet ?

> Best regards,

> Rodrigo A. de Freitas

Re:Slowliness while closing the ClientDataSet


Yes! it worked!! Although now the ClientDataSet seem a little bit slower to
open...

But, can you tell me why does it worked ??

"Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
news:3d197f32_2@dnews...

Quote
> Try setting DSP.Option poNoReset to True and see if that cures the
problem.

> --
> Dave Rowntree
> "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
> news:3d18a3c8_2@dnews...
> > Hi folks!

> > In the OnClose event of my form I call the method Close of a
> TClientDataSet,
> > but it takes too much time (about 15 seconds) to close a query with just
5
> > records! Is it a DbExpress bug ?? Is there any property or any cares I
> > should take before close the ClientDataSet ?

> > Best regards,

> > Rodrigo A. de Freitas

Re:Slowliness while closing the ClientDataSet


Are you using incremental fetching (CDS.PacketRecords > 0)?

--
Dave Rowntree
"Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
news:3d1b170c_1@dnews...

Quote
> Yes! it worked!! Although now the ClientDataSet seem a little bit slower
to
> open...

> But, can you tell me why does it worked ??

> "Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
> news:3d197f32_2@dnews...
> > Try setting DSP.Option poNoReset to True and see if that cures the
> problem.

> > --
> > Dave Rowntree
> > "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
> > news:3d18a3c8_2@dnews...
> > > Hi folks!

> > > In the OnClose event of my form I call the method Close of a
> > TClientDataSet,
> > > but it takes too much time (about 15 seconds) to close a query with
just
> 5
> > > records! Is it a DbExpress bug ?? Is there any property or any cares I
> > > should take before close the ClientDataSet ?

Re:Slowliness while closing the ClientDataSet


Yes, I'm using it. I set it to 500 records, but as I'm a developing stage,
the most populated table has only 10 records...

"Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
news:3d1b293e_1@dnews...

Quote
> Are you using incremental fetching (CDS.PacketRecords > 0)?

> --
> Dave Rowntree
> "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
> news:3d1b170c_1@dnews...
> > Yes! it worked!! Although now the ClientDataSet seem a little bit slower
> to
> > open...

> > But, can you tell me why does it worked ??

> > "Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
> > news:3d197f32_2@dnews...
> > > Try setting DSP.Option poNoReset to True and see if that cures the
> > problem.

> > > --
> > > Dave Rowntree
> > > "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
> > > news:3d18a3c8_2@dnews...
> > > > Hi folks!

> > > > In the OnClose event of my form I call the method Close of a
> > > TClientDataSet,
> > > > but it takes too much time (about 15 seconds) to close a query with
> just
> > 5
> > > > records! Is it a DbExpress bug ?? Is there any property or any cares
I
> > > > should take before close the ClientDataSet ?

Re:Slowliness while closing the ClientDataSet


Try setting CDS.PacketRecords := -1 instead and see if that cures your
problem.

If you are using MySQL I believe there is a problem closing a partially
fetched cursor.

--
Dave Rowntree
"Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
news:3d209feb$1_2@dnews...

Quote
> Yes, I'm using it. I set it to 500 records, but as I'm a developing stage,
> the most populated table has only 10 records...

> "Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
> news:3d1b293e_1@dnews...
> > Are you using incremental fetching (CDS.PacketRecords > 0)?

> > --
> > Dave Rowntree
> > "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
> > news:3d1b170c_1@dnews...
> > > Yes! it worked!! Although now the ClientDataSet seem a little bit
slower
> > to
> > > open...

> > > But, can you tell me why does it worked ??

> > > "Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
> > > news:3d197f32_2@dnews...
> > > > Try setting DSP.Option poNoReset to True and see if that cures the
> > > problem.

> > > > --
> > > > Dave Rowntree
> > > > "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
> > > > news:3d18a3c8_2@dnews...
> > > > > Hi folks!

> > > > > In the OnClose event of my form I call the method Close of a
> > > > TClientDataSet,
> > > > > but it takes too much time (about 15 seconds) to close a query
with
> > just
> > > 5
> > > > > records! Is it a DbExpress bug ?? Is there any property or any
cares
> I
> > > > > should take before close the ClientDataSet ?

Re:Slowliness while closing the ClientDataSet


Thanks very much, but it wasn't PacketRecords fault... It was because of
Windows XP... Due some weird reason, the .GDB extension of Interbase
databases conflicts with some XP service, after had renamed my databases
from .GDB to .FDB, everything started to work fine and extremely fast!

"Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
news:3d20a130_2@dnews...

Quote
> Try setting CDS.PacketRecords := -1 instead and see if that cures your
> problem.

> If you are using MySQL I believe there is a problem closing a partially
> fetched cursor.

> --
> Dave Rowntree
> "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
> news:3d209feb$1_2@dnews...
> > Yes, I'm using it. I set it to 500 records, but as I'm a developing
stage,
> > the most populated table has only 10 records...

> > "Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
> > news:3d1b293e_1@dnews...
> > > Are you using incremental fetching (CDS.PacketRecords > 0)?

> > > --
> > > Dave Rowntree
> > > "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
> > > news:3d1b170c_1@dnews...
> > > > Yes! it worked!! Although now the ClientDataSet seem a little bit
> slower
> > > to
> > > > open...

> > > > But, can you tell me why does it worked ??

> > > > "Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
> > > > news:3d197f32_2@dnews...
> > > > > Try setting DSP.Option poNoReset to True and see if that cures the
> > > > problem.

> > > > > --
> > > > > Dave Rowntree
> > > > > "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
> > > > > news:3d18a3c8_2@dnews...
> > > > > > Hi folks!

> > > > > > In the OnClose event of my form I call the method Close of a
> > > > > TClientDataSet,
> > > > > > but it takes too much time (about 15 seconds) to close a query
> with
> > > just
> > > > 5
> > > > > > records! Is it a DbExpress bug ?? Is there any property or any
> cares
> > I
> > > > > > should take before close the ClientDataSet ?

Re:Slowliness while closing the ClientDataSet


You might like to post that information in the interbase ng's if it's not
already known there.

--
Dave Rowntree
"Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
news:3d22e96e_1@dnews...

Quote
> Thanks very much, but it wasn't PacketRecords fault... It was because of
> Windows XP... Due some weird reason, the .GDB extension of Interbase
> databases conflicts with some XP service, after had renamed my databases
> from .GDB to .FDB, everything started to work fine and extremely fast!

> "Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
> news:3d20a130_2@dnews...
> > Try setting CDS.PacketRecords := -1 instead and see if that cures your
> > problem.

> > If you are using MySQL I believe there is a problem closing a partially
> > fetched cursor.

> > --
> > Dave Rowntree
> > "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
> > news:3d209feb$1_2@dnews...
> > > Yes, I'm using it. I set it to 500 records, but as I'm a developing
> stage,
> > > the most populated table has only 10 records...

> > > "Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
> > > news:3d1b293e_1@dnews...
> > > > Are you using incremental fetching (CDS.PacketRecords > 0)?

> > > > --
> > > > Dave Rowntree
> > > > "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
> > > > news:3d1b170c_1@dnews...
> > > > > Yes! it worked!! Although now the ClientDataSet seem a little bit
> > slower
> > > > to
> > > > > open...

> > > > > But, can you tell me why does it worked ??

> > > > > "Dave Rowntree" <da...@brookswood.co.uk> escreveu na mensagem
> > > > > news:3d197f32_2@dnews...
> > > > > > Try setting DSP.Option poNoReset to True and see if that cures
the
> > > > > problem.

> > > > > > --
> > > > > > Dave Rowntree
> > > > > > "Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in
message
> > > > > > news:3d18a3c8_2@dnews...
> > > > > > > Hi folks!

> > > > > > > In the OnClose event of my form I call the method Close of a
> > > > > > TClientDataSet,
> > > > > > > but it takes too much time (about 15 seconds) to close a query
> > with
> > > > just
> > > > > 5
> > > > > > > records! Is it a DbExpress bug ?? Is there any property or any
> > cares
> > > I
> > > > > > > should take before close the ClientDataSet ?

Re:Slowliness while closing the ClientDataSet


"Rodrigo A. de Freitas" <rafrei...@ajato.com.br> wrote in message
news:3d22e96e_1@dnews...

Quote
> Thanks very much, but it wasn't PacketRecords fault... It was because of
> Windows XP... Due some weird reason, the .GDB extension of Interbase
> databases conflicts with some XP service, after had renamed my databases
> from .GDB to .FDB, everything started to work fine and extremely fast!

Yes, unfortunately .gdb was added to the list of files XP tries to backup
everytime it is changed. While this solves the problem for your databases,
it doesn't solve it for ISC4.gdb where IB stores user info. Best thing to do
is to install IB and your databases on a selected drive that has this
feature turned off.

--
Wayne Niddery (Logic Fundamentals, Inc.)
RADBooks: http://www.logicfundamentals.com/RADBooks/delphibooks.html
Those who disdain wealth as a worthy goal for an individual or a society
seem not to realize that wealth is the only thing that can prevent
poverty. - Thomas Sowell

Other Threads