Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Delphi4 - making a Database -treeview faster

Posted on 2007-04-09
12
Medium Priority
?
541 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
11 Comments
 
LVL 5

Accepted Solution

by:
xr1140 earned 100 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 100 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month15 days, 5 hours left to enroll

577 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