Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 883937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:40:26+00:00 2026-05-15T12:40:26+00:00

I have a listview, which is used as an index to a simple search

  • 0

I have a listview, which is used as an index to a simple search application. Each item of the index is a word, and clicking on the item will add that item to the search textbox. The user can first click on any of the words she/he prefers to and them to the search textbox and then click search, to search in the documents.
The problem is that adding more than around 1000 items to a ListView takes a lot of runtime!
I have designed a progressbar and added a timer which starts adding items to the listview as soon as the form loads. This gives responsiveness to the application, but still the efficiency is very low.
I suspect there might be around 100,000 words in the index when the document base grows enough so I need a more efficient way to do this. Maybe I need to change the ListView component to something else.
This is the code in the timer to add the items to the listview:

if (!listViewDone)
        {
            int pos = 0;
            ListView listView1 = Search.getInstance().getListView();
            listView1.BeginUpdate();
            for (pos = listViewPos; pos < termf.Count && pos < listViewPos + listViewChunk; ++pos)
            {
                TermFreq t = termf[pos];
                listView1.Items.Add(new ListViewItem(new String[] { t.term }));
                progressBar1.Value = pos;
            }
            listView1.EndUpdate();
            listViewPos = pos;

            if (pos == termf.Count)
            {
                listViewDone = true;
                termf = null;
                timer1.Enabled = false;
                Visible = false;
            }
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T12:40:27+00:00Added an answer on May 15, 2026 at 12:40 pm

    As hmemcpy mentioned, the VirtualMode will speed things up considerably. I’m not sure about the commercial nature of the project but I have used the excellent open source ObjectListView which includes a FastObjectListView variant.

    This is basically an extended virtual ListView that is extremely fast and as an added bonus is much nicer to work with. The documentation claims it “can build a list of 10,000 objects in less than 0.1 seconds” and while I can’t vouch for that whenever I have used it I’ve never noticed any serious lag. The licensing could be an issue for you though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListView in which each item has a SeekBar. When I update
I have a view which is used as an item in a ListView .
I have a listview which has its datasource changed after update of a search
In my form I have a listview and a panel which is used as
I have a ListView control which I used to populate using an ASP ObjectDataSource
I have a ListAdapter which is used to display a list in the Listview
I have a listview which I populate from a webservice query. Problem is that
I have one listview in which i am displaying data that i got, it
I have created a custom listview that is populated using a row.xml file. Each
I have ListView which is saving all data to database. For adding i have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.