Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #68340 > unrolled thread
| Started by | "Joseph L. Casale" <jcasale@activenetwerx.com> |
|---|---|
| First post | 2014-03-13 21:24 +0000 |
| Last post | 2014-03-13 21:24 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
asyncio question "Joseph L. Casale" <jcasale@activenetwerx.com> - 2014-03-13 21:24 +0000
| From | "Joseph L. Casale" <jcasale@activenetwerx.com> |
|---|---|
| Date | 2014-03-13 21:24 +0000 |
| Subject | asyncio question |
| Message-ID | <mailman.8134.1394745940.18130.python-list@python.org> |
I have a portion of code I need to speed up, there are 3 api calls to an external system where the first enumerates a large collection of objects I then loop through and perform two additional api calls each. The first call is instant, the second and third per object are very slow. Currently after accumulating all the data I write the relevant data into a database. I have the ability to hold all this in memory and dump it once fully accumulated, so performing the second and third call in parallel with fixed batches would be great, I took a look at coroutines and some skeleton code worked fine, but I am not sure how to perform the acquisition in fixed groups like I might for example with multiprocessing and a pool of workers. Anyone done something like this or have an opinion? Thanks, jlc
Back to top | Article view | comp.lang.python
csiph-web