Running same python code in visual is 5-6 times slower than jupyter

210 Views Asked by At

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

0

There are 0 best solutions below