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. Download accelarator

Download accelarator

Scheduled Pinned Locked Moved C / C++ / MFC
performancehelpquestion
3 Posts 2 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.
  • Y Offline
    Y Offline
    Y_R
    wrote on last edited by
    #1

    Hello, I am trying to build a download accelarator (a program which downloads a file through several connections to increase the speed). I have created four threads. Each thread downloads the file from diffrent offset and finallly I join al this parts. The problem is that when I use one thread( without changing the thread's code) it much faster. It like the additional threads are slowing one another. In each thread I initialize the connection (CInternetSession->CHttpSession) and later in the thread I have put a loop which downloads the files. The initialization part is in a critical section. Can anyone tell whats wrong. Did anyone encountered similar problem? Sincerely yours Y.R.

    C 1 Reply Last reply
    0
    • Y Y_R

      Hello, I am trying to build a download accelarator (a program which downloads a file through several connections to increase the speed). I have created four threads. Each thread downloads the file from diffrent offset and finallly I join al this parts. The problem is that when I use one thread( without changing the thread's code) it much faster. It like the additional threads are slowing one another. In each thread I initialize the connection (CInternetSession->CHttpSession) and later in the thread I have put a loop which downloads the files. The initialization part is in a critical section. Can anyone tell whats wrong. Did anyone encountered similar problem? Sincerely yours Y.R.

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      Y_R wrote: It like the additional threads are slowing one another. how many CPUs does your computer have ? ( for that matter, how many internet connections does it have ? ) Cleek | Image Toolkits | Thumbnail maker

      Y 1 Reply Last reply
      0
      • C Chris Losinger

        Y_R wrote: It like the additional threads are slowing one another. how many CPUs does your computer have ? ( for that matter, how many internet connections does it have ? ) Cleek | Image Toolkits | Thumbnail maker

        Y Offline
        Y Offline
        Y_R
        wrote on last edited by
        #3

        I have one cpu and one internet connection (750 k). But it should not matter because when one is downloading file from a server that is slow multiple http connections to this server will raise the overall speed like many existing download accelators(e.g. Get Right, DAP, etc..) I think the problem is in my multithreading part. Sincerely yours Y.R.

        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