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. File Access from CD-ROM

File Access from CD-ROM

Scheduled Pinned Locked Moved C / C++ / MFC
cssdatabasehelptutorialquestion
3 Posts 3 Posters 2 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.
  • G Offline
    G Offline
    Gunnar Matzler
    wrote on last edited by
    #1

    Hello everbody, I created a hashtable in a file to search the contents of some database. I use the standard operations (fseek, fread etc) to access the file. Everything works ok, as long as my indexfile is read from harddisk. (There are more then 200000 entry in it and it takes less then a second to search for an specific entry). However, if i put this on cd-rom its about 2800% !!! slower. Especially if my search returns more then one result. Is there anyone around here who knows how to optimize a file for cd-rom access? Sorry for my english, what i am trying to say is: How has i file to be constructed so that it can be read from cd-rom real fast? Any help would be highly appreciated.

    D H 2 Replies Last reply
    0
    • G Gunnar Matzler

      Hello everbody, I created a hashtable in a file to search the contents of some database. I use the standard operations (fseek, fread etc) to access the file. Everything works ok, as long as my indexfile is read from harddisk. (There are more then 200000 entry in it and it takes less then a second to search for an specific entry). However, if i put this on cd-rom its about 2800% !!! slower. Especially if my search returns more then one result. Is there anyone around here who knows how to optimize a file for cd-rom access? Sorry for my english, what i am trying to say is: How has i file to be constructed so that it can be read from cd-rom real fast? Any help would be highly appreciated.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Gunnar Mätzler wrote: ...it and it takes less then a second to search for an specific entry). However, if i put this on cd-rom its about 2800% !!! slower. So every second of HDD time equates to 29 seconds of CD time? It's true that CD-ROM drives will be slower than HD drives, but how much slower depends on a lot of factors. I suggest reading this guide to see what all is going on.


      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      1 Reply Last reply
      0
      • G Gunnar Matzler

        Hello everbody, I created a hashtable in a file to search the contents of some database. I use the standard operations (fseek, fread etc) to access the file. Everything works ok, as long as my indexfile is read from harddisk. (There are more then 200000 entry in it and it takes less then a second to search for an specific entry). However, if i put this on cd-rom its about 2800% !!! slower. Especially if my search returns more then one result. Is there anyone around here who knows how to optimize a file for cd-rom access? Sorry for my english, what i am trying to say is: How has i file to be constructed so that it can be read from cd-rom real fast? Any help would be highly appreciated.

        H Offline
        H Offline
        Henry miller
        wrote on last edited by
        #3

        Every time you ask for data on a CD that is not right after the last data you asked for the CD will need 1 second to position. So you need to figure out how you can read your table in order. Suggestion: Get Knuth's "The art of computer programing" out, and look for the sections on searching from tape.

        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