heroku / salesforce-bulk

Python interface to the Salesforce.com Bulk API
MIT License
206 stars 157 forks source link

Fix README examples (causing low performance) #98

Open kirqz23 opened 3 years ago

kirqz23 commented 3 years ago

Hi,

There is an issue in README examples: https://github.com/heroku/salesforce-bulk/blame/main/README.rst#L66 https://github.com/heroku/salesforce-bulk/blame/main/README.rst#L75

IteratorBytesIO is not needed cause the function already returns it. https://github.com/heroku/salesforce-bulk/blob/90fbdabb78207c8de04b8d35b80957189736f1a8/salesforce_bulk/salesforce_bulk.py#L503

What I've noticed is that when you run result = json.load(IteratorBytesIO(result)) instead of result = json.load(result) my script is running 35 min vs 2 min. It can cause problems for other users as well in opened issues.