473,791 Members | 3,179 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Building a windows explorer like application...

UJ
I have an app that I've already written that works just great. It's a
window's explorer like app for our data. Problem is, to build the treeview
takes too long (30 secs and upward for less than 1000 records). And the
database is only going to be getting bigger.

Here's essentially what I do:

Get three tables that are related (I don't make the relationship locally)
Start stepping through table 1.
Find all of the records from table 2 that have a value from the table 1
record.
Start stepping through those records.
Find all of the records from table 3 that have the value from the
record in table 2.

Now the way I pare down the records is with filters. I assume that's what's
taking so long because the records don't have any indexes.

How can I speed this up? Would setting up a relationship between the tables
speed it up? Is there a way to create an index on the records so they will
take much less time to find the records they need?

TIA - Jeff.
Jul 11 '06 #1
2 1910
Don't populate the treeview with all the data at once, only populate it
as the user expands each node.

UJ wrote:
I have an app that I've already written that works just great. It's a
window's explorer like app for our data. Problem is, to build the treeview
takes too long (30 secs and upward for less than 1000 records). And the
database is only going to be getting bigger.

Here's essentially what I do:

Get three tables that are related (I don't make the relationship locally)
Start stepping through table 1.
Find all of the records from table 2 that have a value from the table 1
record.
Start stepping through those records.
Find all of the records from table 3 that have the value from the
record in table 2.

Now the way I pare down the records is with filters. I assume that's what's
taking so long because the records don't have any indexes.

How can I speed this up? Would setting up a relationship between the tables
speed it up? Is there a way to create an index on the records so they will
take much less time to find the records they need?

TIA - Jeff.
Jul 11 '06 #2
UJ wrote:
>
How can I speed this up? Would setting up a relationship between the tables
speed it up? Is there a way to create an index on the records so they will
take much less time to find the records they need?
There are probably two main factors that will affect performance.

The first factor is the time taken to load the dataset. Because
datasets use a disconnected in-memory model you have to load your
complete set of data into memory before using the dataset. For large
databases this can take considerable time as well as costing you are
large amount of memory.

The second factor is the time take to create the visual representation
of your data by creating tree nodes. Using the standard treeview
control you can improve this somewhat by creating dummy child nodes for
each node at a given level and then when the node is expanded you
retrieve the actual children for the node. This doesn't help you if
you have a large number of children at any given level. For instance
if you have potentially a million customers as your base level nodes
then you'd still be stuck with creating a million tree nodes which
would be very time consuming and memory expensive. It also means that
you will get the disappearing expansion indicator phenonoma - ie if a
node doesn't have children you still see an expansion indicator which
then disappears when you try to expand it.

I'd suggest doing some basic profiling to find out what the major issue
is for your application. Infralution has some products which you might
want to look at which address both these issues.

Virtual Data Objects allows you to create connected recordsets (just
like in old ADO) and bind .NET controls to them. Connected recordsets
only load data into memory as it is requested by the application - this
means your application data is loaded almost instantly regardless of
the database size and has a minimal memory footprint.

Virtual Tree is a data driven tree/listview .NET custom control that
creates the visual representation (rows or nodes) on demand. This
means it only creates row (or node) objects for those data items that
are currently displayed. So even when displaying a million base level
items VirtualTree only needs to create row objects for the actual
visible rows (say 30). This means that it is near instantaneous.
You can also avoid the disappearing expansion indicator issue. Virtual
Tree can be bound to standard .NET datasets or you can use it in
conjunction with Virtual Data Objects to get the maximum in
performance.

You can get more information and download evaluation versions from:
www.infralution.com/virtualtree.html
www.infralution.com/virtualdata.html

Regards
Grant Frisken
Infralution

Jul 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3709
by: Bob Everland | last post by:
I have an application that is ISAPI and the only way to secure it is through NT permissions. I need to have a way to login to windows authentication so that when I get to the ISAPI application no boxes come up. I want an ASP page to sit between the user and the ISAPI application. The rest of my application is using authentication that is database driven and wouldn't want the users to know the userid and password. Is this possible? If so...
1
5100
by: Jon Slaughter | last post by:
I'm trying to create a windows explorer like app and the problem I'm having is getting the proper icon for the folders and items. In windows explorer there are many different icons and most seem to be in the shell32.dll. The problem is that there also seems to be custom icons that are installed by applications. For example, "My Music" In My Documents has an icon that is different from the normal folders. I have installed an application...
3
8631
by: garyusenet | last post by:
Dear Professionals, I have recently been using the wonderful krypton toolkit and am trying to use them in my small hobby application. I include this bit of info as an aside really because i'm sure my question can be extrapolated to the more general case, so here goes! I have a box standard windows forms project. (File, New Project, Windows Application, OK)
9
8562
by: =?Utf-8?B?THVpcyBBbnRvbmlvIFJvc2VsbG8gR2FyY2lh?= | last post by:
Hi, I have a big problem with a Visual C++ 6.0 function that retrives the logical drives and types in the local system. This function works perfectly on Windows 98, NT, 2000, XP and 2003, but I have tested it on Windows Vista and it doesn't retrieve remote network drives. It must retrieve a string with the drive letters and a string with the drive types (2=removable drive, 3=hard drive, 4=remote drive, 5=CD-ROM drive, 6=RAM drive) I...
1
4593
by: CSharpner | last post by:
Short Question: How do I support Cut/Paste to/from a .NET app and Windows Explorer? Full Text: I'm nearing the completion of a Remote File Management application. It looks and feels a lot like Windows Explorer. The difference is that it communicates with a remote server via web services. The remote web services store and retrieve the file bits to/from a database... along with some other bells and whistles that Explorer doesn't have.
5
2351
by: =?Utf-8?B?SmFwZQ==?= | last post by:
im writing a c# console application that copies files chosen from the windows explorer. I chose the files i want to copy and then from the (right key) menu chose my program. the program starts fine but passes an error that the file(s) are in use ny another user. This other user must be the windows explorer. Any workarounds to free the files from the windows explorer?
3
2087
by: Aussie Rules | last post by:
Hi, I have an application that processes files from the users hard disk. The user is able to select what files they want processed from there hard disk in windows explorer. In windows explorer, when you right click on a file you are given the option to 'send to'. I would like to have an option in this 'send to' menu so that the user can 'send to' my application.
11
2437
by: Jason | last post by:
Say I build a simple .exe file. n exe that will look at a file, read that file and put the contents into an email. If I take the .exe that I built from the Bin\Release folder and copy it to a machine will it work or do I need to make sure that I have dot net installed and all of this ? What is the best way to build an .exe so that I can run it on most machines without any updates?
0
30248
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is a comprehensive list of all autostart locations for Windows OSes: NOTE : These are some abbreviations used in this list. Please note them carefully: HKCU = HKEY_CURRENT_USER HKLM = HKEY_LOCAL_MACHINE
0
10419
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10201
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10147
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9987
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6770
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4100
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3709
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.