Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Make it faster to get multiple Linodes' IPs #6

Open
danslimmon opened this issue Jul 25, 2013 · 0 comments
Open

Make it faster to get multiple Linodes' IPs #6

danslimmon opened this issue Jul 25, 2013 · 0 comments
Assignees

Comments

@danslimmon
Copy link
Contributor

Currently if you want to get all Linodes with their IPAddresses, like so,

    for node  in Linode.search():
        print node.label
        print "\t" + repr([addr.address for addr in node.ipaddresses])

we do a linode.ipaddress.list callout for every Linode. This gets prohibitively slow as you add Linodes. Instead, we should provide some way to batch these calls together using linode-python's batching support. I would like it to look roughly like this:

    Linode.search(prefetch=["ipaddresses"])

This would do the linode.list call and then batch together all the linode.ipaddress.list calls. Some memoizing will be called for, but that's good; we should have that anyway.

@ghost ghost assigned danslimmon Jul 31, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant