0

I am using pydub to mix two wav files in one file. Each wav file has about 25Mb and for me page is loaded in about 4 seconds ( so execution time would be 4 seconds )

Does this execution time depend on user's internet connection speed?

If it has any sense : The test.py file is on GoDaddy Deluxe Linux Hosting)

Jiaaro
  • 74,485
  • 42
  • 169
  • 190
John
  • 7,500
  • 16
  • 62
  • 95
  • We need much more information. Does the program do any internet access itself? E.G., are the files on the same machine as the program? If the program doesn't do internet access, then the connection speed shouldn't matter (except for delays in seeing the output in a terminal -- i.e., unless it produces lots of stdio output!) – Andrew Jaffe Jan 03 '13 at 11:10
  • @AndrewJaffe my python program is executed in browser, very simple one 7 lines of code, it mix two wav files from same server and the final file is saved on same server too... The only result I get is an unique ID. Thanks. – John Jan 03 '13 at 11:23

2 Answers2

1

it does not: once your script starts dubbing the wav files, it's another task.

see it as a 3-step (i'm guessing, very little information is provided)

  • step 1: you send the request --> time determined by "internet speed"
  • step 2: files get dubbed --> server side work, internet speed doesn't count anymore
  • step 3: you get the result back --> again internet speed related

you have to time them separately: run a benchmark only on the mixing part and see it for yourself

Funny practical way to see this:

Consider the dinner process: the time you spend eating your dinner doesn't depend on the time it takes for you to order or for the waiter to deliver the meal to you.

quick edit: i just realized it may depend on internet speed, if the dubbing/mixing part is streamed real time while being processed. but this doesn't seem your case.

Samuele Mattiuzzo
  • 10,760
  • 5
  • 39
  • 63
  • @JimmyKane hahaha yeah, now i got it :) – Samuele Mattiuzzo Jan 03 '13 at 11:17
  • Thanks! It just mix two files and the save final file on same server. The only result I get is unique id :) Nice example lol – John Jan 03 '13 at 11:18
  • @John if you only get the id back (and don't stream any type of data), then probably the request/response process takes less than 10% of total timing. 2 x 25 mb worth of wav to be mixed up is a big work for a (probably) virtual machine provided by any host – Samuele Mattiuzzo Jan 03 '13 at 11:21
0

No. The execution happens on the server and the execution time depends on the server specs and your script optimizations. The internet speed just affects when the client will receive the response after it is ready from the server and sent!

So in few words:

  1. Server gets request from browser (time for request to reach server depends on internet speed of the client and the host)
  2. Server processes the request according to your code (Execution time depends on your code)
  3. Server responds to client and client receives response (time for request to reach client depends on internet speed of the client and the host)
Jimmy Kane
  • 16,223
  • 11
  • 86
  • 117