473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Fastest/Most Efficient way to repopulate a listbox?

BigPapaN0z
I'm looking for a little bit of input on this topic. The scenario is this: I have a textbox which, using the _Changed event, searches a simple string array filled with filenames for a partial match. The find/search routine works well, but the biggest drawback I'm finding is the speed at which it takes to repopulate the listbox for the results. I'm dealing with a LOT of data (10k-20k entries) and would like anyone's input on how I might be able to speed up execution. I've considered adding a timer in the _Changed event that will give the user time to type out the query before starting to repopulate (the first letter or two causes the program to temporarily freeze/pause, anything after that is fairly quick). I can post code if it's needed, but I'm not looking for a code answer, just thoughts and/or experiences from other programmers.

Thanks in advance!

BigPapaN0z

PS - Using VS2010 for anyone interested.
Nov 17 '12 #1
2 1423
Rabbit
12,516 Expert Mod 8TB
I suppose the first question is why you would need a list to contain that many items. It seems unwieldy to use.

You could just populate the first 100 or so items and then have buttons to populate the next 100 if they need to do so.
Nov 17 '12 #2
That's a definite possibility. The list is for filenames that are searchable. I'm writing a very simple karaoke rotation utility that will launch a 3rd party karaoke viewer/player. I have over 30k files, so on the first population of the listbox (for general browsing) it tends to freeze for a few seconds.

For the time being, I have added a timer that resets every time the user types. Set it for 2 seconds, and when the timer ticks, it searches for whatever is in the search textbox and populates the listbox with the results (replacing the entire list of files available).
Nov 20 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Linus Nikander | last post by:
Having recently load-tested the application we are developing I noticed that one of the most expensive (time-wise) calls was my fetch of a db-connection from the defined db-pool. At present I fetch...
2
by: Belmin | last post by:
Hi all, Wanted to know what is the most efficient way of doing a select query for mysql that only returns one value. For example: $mysqli->query('select count(*) from log'); $temprec =...
2
by: Jim Kitterman | last post by:
I am looking for the most efficient way of searching a large xml document (> 14mg). If I could get some pointers in the right direction. I am using VB.NET. It is readonly.
0
by: Einar Høst | last post by:
Hi, I'm reading data from a text file, and having read a bit on performance and memory, I'm wondering how it could be done in the fastest, most frugal way. The data comes in messages, one per...
11
by: hoopsho | last post by:
Hi Everyone, I am trying to write a program that does a few things very fast and with efficient use of memory... a) I need to parse a space-delimited file that is really large, upwards fo a...
2
by: Dan | last post by:
I've got a "Select all" button under a listbox. What's the most efficient way to select all the items in the listbox?
13
by: chrisben | last post by:
Hi, I need to insert more than 500,000 records at the end of the day in a C# application. I need to finish it as soon as possible. I created a stored procedure and called it from ADO to insert...
1
by: cwertman | last post by:
I have a document like so (Its actually a serilization of an Object) <Person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">...
1
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
Using .NET 2.0 is it more efficient to copy files to a single folder versus spreading them across multiple folders. For instance if we have 100,000 files to be copied, Do we copy all of them to...
8
by: secutos | last post by:
Programming Language: C#, .NET Framework 3.5 In this context, Form and App both describe a Microsoft Windows desktop application i'm creating. I'm creating a wordlist generator. I need to be able...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
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...

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.