Solved

Delphi4 - making a Database -treeview faster

Posted on 2007-04-09
12
533 Views
Last Modified: 2010-07-27
Hi all

I am having a TreeView with nearly 1000 nodes and it might be more than this number.
I am loading the treeView from DataBase - paradox.
my problem is When loading the tree it's a little bit slow , taking some time to load the tree from the database. is there a way i can fasten the loading i tried the beginupdate and endupdate but it didn't give me a good result.
One more thing after loading the tree it's repainting and blinking when first got focus on the form that the tree exists in it

thanks a lot
0
Comment
Question by:ibrobar
  • 4
  • 3
  • 2
  • +2
12 Comments
 
LVL 5

Accepted Solution

by:
xr1140 earned 25 total points
ID: 18874996

i`ll recommend you to use Virtual TreeView, it`s more robust then delphi native treeview component (i`m assuming you are using the default delphi component). This will NOT improve the DB loading speed, but it will improve the speed of your application when it came down to handling a large number of nodes




Virtual Treeview > http://www.soft-gems.net/index.php?option=com_content&task=view&id=12&Itemid=33
0
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 18875323
try setting the doublebuffered property of the treeview to cut down on flickering

TreeView1.DoubleBuffered := true;
0
 
LVL 21

Expert Comment

by:ziolko
ID: 18877326
little comment:  there's nothing like delphi native treeview, TTreeView is wrapper for windows control just like TListView. microsoft  gave up with further development of these components so they wont be any faster
so only way is to use 3rd party components like virtual treeview

ziolko.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:ibrobar
ID: 18897899
Hi all

I am loading 1500 nodes in 20 seconds , is it much.
thanks
0
 
LVL 5

Expert Comment

by:xr1140
ID: 18899170

that really depends on how "heavy" your nodes are.
0
 

Author Comment

by:ibrobar
ID: 18903469
Dear Xr1140
I have explained about my tree and nodes previously .
any way can anybody tell me about the ADO stuff like ADOQuery , what are they ?

thanks
0
 
LVL 5

Expert Comment

by:xr1140
ID: 18903874
The TADOQuery component provides Delphi developers the ability to fetch data from one or multiple tables from an ADO database using SQL.
0
 
LVL 21

Assisted Solution

by:ziolko
ziolko earned 25 total points
ID: 18904008
you have paradox so i guess you use BDE right?
if so, moving from BDE to ADO for fetching 1000 records will not improve performance
a lot, thus it's recommended to use ADO rather than BDE.

ADO is microsoft's technology providing unified access to different database systems,
concept of ADO is similar to BDE diference is that ADO is preinstalled with Windows operating system
so you don't have to install it manually (like BDE). Moreover ADO supports multithreading
and is much more efficient when you need many connections with single session (with BDE with one session you can open upto 16 connections if i remember correctly, if you open more performance drops dramatically or even app might hang).

most of database vendors provide ADO drivers for their systems.

create empty text file and change extension from .txt to .udl then go to provider tab you will see all providers supported by your OS, of course you can use ODBC drivers.

ziolko.
0
 
LVL 21

Expert Comment

by:ziolko
ID: 18904012
ahhh just spoted that you use D4 I'm not sure if D4 have VCL components for ADO, for sure they are in D5

ziolko.
0
 
LVL 21

Expert Comment

by:ziolko
ID: 19653199
is this Q still open?

please see here:
http://www.experts-exchange.com/help.jsp#hs5

ziolko.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21156549
Forced accept.

Computer101
EE Admin
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Newbie Thread Programming 1 161
Intraweb download file link ? 1 156
Delphi problems to abort a printjob 9 25
Delphi Seattle StructureView color 1 15
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question