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 393539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:16:04+00:00 2026-05-12T16:16:04+00:00

Just for fun, I develop a download manager and I’d like to know if

  • 0

Just for fun, I develop a download manager and I’d like to know if reading a large stack of data (i.e. 80 or 100KB) from a socket over the net makes the download speed higher, instead of reading 4KB for each loop iteration?

(My average download speed is 200KBPS when I download a file with firefox for example)

Thanks, Nir Tayeb.

  • 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-12T16:16:04+00:00Added an answer on May 12, 2026 at 4:16 pm

    The answer is NO.

    your network transfer rate (200kbps) indicates that buffering 4k or 8k or 200k will hardly make a difference. The time spent between reads is too small. The bottleneck seems to be your transfer rate anyway.

    Let’s try with a stackoverflow 30.9MB mp3 podcast:

    NOTE: This is a unreliable hack whose results can be affected by a lot
    of factors – useful for demonstration
    purposes only)

    import urllib2
    import time
    
    def report(start, size, text):
        total = time.time() - start
        print "%s reading took %d seconds, transfer rate %.2f KBPS" % (
                text, total, (size / 1024.0) / total)
    
    start = time.time()
    url = ('http://itc.conversationsnetwork.org/audio/download/'
           'ITC.SO-Episode69-2009.09.29.mp3')
    f = urllib2.urlopen(url)
    start = time.time()
    data = f.read() # read all data in a single, blocking operation
    report(start, len(data), 'All data')
    f.close()
    
    f = urllib2.urlopen(url)
    start = time.time()
    while True:
        chunk = f.read(4096) # read a chunk
        if not chunk:
            break
    report(start, len(data), 'Chunked')
    f.close()
    

    The results in my system:

    All data reading took 137 seconds, transfer rate 230.46 KBPS
    Chunked reading took 137 seconds, transfer rate 230.49 KBPS
    

    So for my system, 2 megabit connection, file size, server chosen, it is not much of a difference if I used chunked reading or not.

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

Sidebar

Related Questions

Just for fun I would like to count the conditional probabilities that a word
I have 160 bits of random data. Just for fun, I want to generate
Just for fun, learning, aesthetics, etc. I've been using Ajax to modify my Tumblr
Just for fun, I had a std::list of const char* , each element pointing
I'm doing just for fun an unread messages checker application in Delphi. I'm using
Check out the following code (written just for fun) namespace N { template<typename T>
I'm developing a website(just for fun) and have been using mostly js/jquery to build
I'm writing a simple QR code generator (just for fun and to learn some
I'm doing a dots game on the iphone for fun ( just simulator) and
I have a game with infinity procedually generated terrain. I'm using 1/f noise for

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.