[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Delphi4 - making a Database -treeview faster

Posted on 2007-04-09
12
Medium Priority
?
538 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 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

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!

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

650 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