Solved

Delphi4 - making a Database -treeview faster

Posted on 2007-04-09
12
532 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
 

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now