Solved

Delphi4 - making a Database -treeview faster

Posted on 2007-04-09
12
534 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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 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

Technology Partners: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to center only a line in richedit? 4 77
DBGrid or StringGrid ? 6 135
IP without any Dots 1 96
Firemonkey Tcameracomponent resultion 1 44
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

739 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