Closed scholer closed 8 years ago
@scholer Thanks for your pull requests and sorry for the very slow response. All changes you made looks great and will be merged in the next version.
Hi @keiono, thank you for accepting my pull requests - and thanks again for making this great little python package to communicate with Cytoscape =) 💯
Currently, a new requests.Session object is created for every request sent. (The requests library does this behind the curtain.) Although the overhead is not too big, it still adds up for lots of repeated calls (e.g. live streaming of rapid changes to a dynamic network). With this PR, the network client and networks share a single, persistent requests.Session object, eliminating the overhead of instantiating a new session object for every request. In the longer term, having a persistent Session object will also make it easier to enable persistent login, user-customized headers, cookies, etc.