Subject Re: [IBO] Performance Issues
Author Antti Kurenniemi
For your 1. point: we have a relatively large app with some 200+ forms, most
of which have database related stuff in them (queries + controls). We only
create three main forms at application startup (our actual main form, an
invisible debug form + the main datamodule), and instantiate the rest as
needed.

None of our users will every use all the forms, and just creating the forms,
even without opening any connections took a lot of time when we had it that
way. Now, the app starts in about a second or so, and each form opens fast
enough that the user can't tell that they're only created then.


Antti Kurenniemi

----- Original Message -----
From: "Frank" <FrankBKK@...>
To: <IBObjects@yahoogroups.com>
Sent: Sunday, October 26, 2008 7:24 AM
Subject: [IBO] Performance Issues


> Hi there,
>
> I'm working with IBO 4.8.7 and older versions since quite a while on
> a large project including many forms and dozens of IB_Queries.
>
> As most of the performance eating tasks are done on the server by
> stored procedures most of the queries are plain and simple selects
> without any potentialy slowing down joins etc. - those queries are
> mostly used to display informations on grids.
>
> As the database is growing and growing I have to cope with various
> performance issues.
>
> Three of them bother me especially:
>
> 1. Starting the application
> As most users tend to start the app. in the morning and let it run
> all day I decided to load all forms and open all queries in one shoot
> which is done like that:
>
> for i := 0 to ComponentCount -1 do
> begin
> if Components[i] is TIB_Query then
> begin
> with Components[i] as TIB_Query do
> begin
> if not Active then
> begin
> Prepare;
> Open;
> end;
> end;
> end;
> end;
>
> Having tables with several 100MB in total it takes actualy approx.
> 2-3 minutes just to open and prepare them.
>
> Is there a better (faster) way to do this ?
>
>
> 2. Turning Master/Detail Relations ON/OFF
> I try to avoid to use multiple TIB_Queries for tables which have to
> be displayed with and without master/detail data as well by turning
> on/off the mastersource which I realized like that:
>
> Turn of the relation:
> iqProdWax.Active := False ;
> iqProdWax.MasterSource := NIL ;
> iqProdWax.MasterLinks.Text := '' ;
> iqProdWax.Active := True ;
>
> Turn on the relation:
> iqProdWax.Active := False ;
> iqProdWax.MasterSource := dsProdCast ;
> iqProdWax.MasterLinks.Text := 'PROD_CAST_PARTS.AUTO_ID_
> TREE=PROD_CAST.AUTO_ID' ;
> iqProdWax.Active := True ;
>
> There should be an easy way to temporarly disable the relation
> without having to re-open the datasource as it just takes to much
> time to open them (see topic 1)
>
> Is there a better (faster) way to turn on/off the master/detail
> relation ?
>
>
> 3. Fetching Query on Incremental search
> Using the incremental search (even on indexed fields) on tables with
> thousands of records causes IBO to constantly fetch records from the
> server even when jumping only a few records further.
> Setting SearchKeyByKey to false helps a bit but using the locate
> function is much faster.
>
> Any ideas if there is a way to offer the user a fast and convinient
> search interface ?
>
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
> InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
> papers,
> keyword-searchable FAQ, community code contributions and more !
> Yahoo! Groups Links
>
>
>