Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Speed up listview when adding thousands of items

Speed up listview when adding thousands of items

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcsharpperformancetutorial
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Master Gollom
    wrote on last edited by
    #1

    Hi, I'm new in Visual C++ .net 2005 and I'm writing a Newsreader and i have the following problem: on my form load event i'm reading a text file into my listview, the textfile contains about 66000 lines, so when the form loads it doesn't respond for a few seconds. I have already searched the new for an answer to my question but nothing could help me out...it also tried to use the virutal mode for the listview but I don't get on with this mode :( I'm becoming desperate...so it would be very nice if someone could help me on this, maybe sending me a tutorial or a very simple sample code thx in advance No need to invent new thing when they already exist

    B A 2 Replies Last reply
    0
    • M Master Gollom

      Hi, I'm new in Visual C++ .net 2005 and I'm writing a Newsreader and i have the following problem: on my form load event i'm reading a text file into my listview, the textfile contains about 66000 lines, so when the form loads it doesn't respond for a few seconds. I have already searched the new for an answer to my question but nothing could help me out...it also tried to use the virutal mode for the listview but I don't get on with this mode :( I'm becoming desperate...so it would be very nice if someone could help me on this, maybe sending me a tutorial or a very simple sample code thx in advance No need to invent new thing when they already exist

      B Offline
      B Offline
      bob16972
      wrote on last edited by
      #2

      Master Gollom wrote:

      textfile contains about 66000 lines

      I think I know why it's taking so long to load the listview.;P

      M 1 Reply Last reply
      0
      • B bob16972

        Master Gollom wrote:

        textfile contains about 66000 lines

        I think I know why it's taking so long to load the listview.;P

        M Offline
        M Offline
        Master Gollom
        wrote on last edited by
        #3

        I also know that the 66000 lines are taking much time but there must be a way to load them faster

        I 1 Reply Last reply
        0
        • M Master Gollom

          I also know that the 66000 lines are taking much time but there must be a way to load them faster

          I Offline
          I Offline
          Immunity18
          wrote on last edited by
          #4

          make 11 threads which load 6000 lines ?:D (isnt that be 11 times faster :D)

          1 Reply Last reply
          0
          • M Master Gollom

            Hi, I'm new in Visual C++ .net 2005 and I'm writing a Newsreader and i have the following problem: on my form load event i'm reading a text file into my listview, the textfile contains about 66000 lines, so when the form loads it doesn't respond for a few seconds. I have already searched the new for an answer to my question but nothing could help me out...it also tried to use the virutal mode for the listview but I don't get on with this mode :( I'm becoming desperate...so it would be very nice if someone could help me on this, maybe sending me a tutorial or a very simple sample code thx in advance No need to invent new thing when they already exist

            A Offline
            A Offline
            anwer_skk
            wrote on last edited by
            #5

            There is an article in code guru for speed-up the list control using virtual list control. Please check the link; some times you may get some idea from that. http://www.codeguru.com/cpp/controls/listview/advanced/article.php/c4151/[^] -- modified at 22:46 Sunday 28th May, 2006

            M 1 Reply Last reply
            0
            • A anwer_skk

              There is an article in code guru for speed-up the list control using virtual list control. Please check the link; some times you may get some idea from that. http://www.codeguru.com/cpp/controls/listview/advanced/article.php/c4151/[^] -- modified at 22:46 Sunday 28th May, 2006

              M Offline
              M Offline
              Master Gollom
              wrote on last edited by
              #6

              thanks for your answer, but i have already found this link on the net but it couldn't help me out because this code is not in vc++ .net 2005 :(

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups