3

I am running same code ( equal no of lines and order) in visual studio and jupyter.

It takes around 17 sec in visual studio while running same code in jupyter takes around 3 sec.

Why this is happening ?

Note : I am not running code in debugging mode.

import datetime
print (str(datetime.datetime.now()))
import pandas as pd
from binance.client import Client
client = Client('apikey', 'secretkey',{"verify": True, "timeout": 2})
def CheckPrice(symbol):
    price=client.get_historical_klines(symbol, Client.KLINE_INTERVAL_1MINUTE, "1 minute ago UTC")
    print(price)
CheckPrice('BNBBTC')
print (str(datetime.datetime.now()))

Below is the results, when running in visual studio. enter image description here

Below is the jupyter results : enter image description here

  • 1
    Your question as stated gives us too little information. What is the code you ran? How did you measure the timings? What was/were the operating system(s), versions of Visual Studio and Jupyter, etc.? Please give us a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) – Rory Daulton Jan 26 '18 at 18:42
  • are you running jupyter inside visual studio? – Natsfan Jan 26 '18 at 19:14
  • It looks like you are timing network access? That's going to vary dramatically based on a lot of factors, most of which have nothing to do with your machine, let alone Python, Jupyter or Visual Studio. – Zooba Mar 08 '18 at 17:40

0 Answers0