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. Optimization on FileReading in VC++

Optimization on FileReading in VC++

Scheduled Pinned Locked Moved C / C++ / MFC
performancehelpc++designalgorithms
5 Posts 5 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.
  • L Offline
    L Offline
    ledallam
    wrote on last edited by
    #1

    Hi, I am working with File reading in VC++. I am reading a log file which has around 1 lakh records. I have to read each record and filter them based on some options and display them on the UI. The problem that I am facing is that it takes enormous amount of time to read so many records. I am using CStdIOFile for reading. Can any one please help me with some optimization techniques that will speed up my reading process. Thanks Madhavi.

    N stefanmihaimogaS K B 4 Replies Last reply
    0
    • L ledallam

      Hi, I am working with File reading in VC++. I am reading a log file which has around 1 lakh records. I have to read each record and filter them based on some options and display them on the UI. The problem that I am facing is that it takes enormous amount of time to read so many records. I am using CStdIOFile for reading. Can any one please help me with some optimization techniques that will speed up my reading process. Thanks Madhavi.

      N Offline
      N Offline
      Nishad S
      wrote on last edited by
      #2

      ledallam wrote:

      which has around 1 lakh records

      It is better you should implement a worker thread for readng and displaying in the UI. :) - NS -

      1 Reply Last reply
      0
      • L ledallam

        Hi, I am working with File reading in VC++. I am reading a log file which has around 1 lakh records. I have to read each record and filter them based on some options and display them on the UI. The problem that I am facing is that it takes enormous amount of time to read so many records. I am using CStdIOFile for reading. Can any one please help me with some optimization techniques that will speed up my reading process. Thanks Madhavi.

        stefanmihaimogaS Offline
        stefanmihaimogaS Offline
        stefanmihaimoga
        wrote on last edited by
        #3

        Hi, I think you should put each line of the log file in the CStringArray and lunch a worker thread to parse each item of that array. Good luck! p.s. it would be nice to have a progress window :)

        1 Reply Last reply
        0
        • L ledallam

          Hi, I am working with File reading in VC++. I am reading a log file which has around 1 lakh records. I have to read each record and filter them based on some options and display them on the UI. The problem that I am facing is that it takes enormous amount of time to read so many records. I am using CStdIOFile for reading. Can any one please help me with some optimization techniques that will speed up my reading process. Thanks Madhavi.

          K Offline
          K Offline
          kakan
          wrote on last edited by
          #4

          You could try overlapped file I/O, with a number of pending file reads simultaineously.

          1 Reply Last reply
          0
          • L ledallam

            Hi, I am working with File reading in VC++. I am reading a log file which has around 1 lakh records. I have to read each record and filter them based on some options and display them on the UI. The problem that I am facing is that it takes enormous amount of time to read so many records. I am using CStdIOFile for reading. Can any one please help me with some optimization techniques that will speed up my reading process. Thanks Madhavi.

            B Offline
            B Offline
            BlackDice
            wrote on last edited by
            #5

            ledallam wrote:

            1 lakh records

            what is 'lakh'? a million? a billion? My Music | My Pics | My Articles BlackDice

            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