Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize asyncio.gather() #76536

Closed
1st1 opened this issue Dec 18, 2017 · 2 comments
Closed

Optimize asyncio.gather() #76536

1st1 opened this issue Dec 18, 2017 · 2 comments
Assignees
Labels
3.7 (EOL) end of life performance Performance or resource usage topic-asyncio

Comments

@1st1
Copy link
Member

1st1 commented Dec 18, 2017

BPO 32355
Nosy @asvetlov, @1st1
PRs
  • bpo-32355: Optimize asyncio.gather() #4913
  • Files
  • t.py
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/1st1'
    closed_at = <Date 2017-12-19.12:20:10.931>
    created_at = <Date 2017-12-18.02:41:07.785>
    labels = ['expert-asyncio', '3.7', 'performance']
    title = 'Optimize asyncio.gather()'
    updated_at = <Date 2017-12-19.12:20:10.930>
    user = 'https://github.com/1st1'

    bugs.python.org fields:

    activity = <Date 2017-12-19.12:20:10.930>
    actor = 'yselivanov'
    assignee = 'yselivanov'
    closed = True
    closed_date = <Date 2017-12-19.12:20:10.931>
    closer = 'yselivanov'
    components = ['asyncio']
    creation = <Date 2017-12-18.02:41:07.785>
    creator = 'yselivanov'
    dependencies = []
    files = ['47336']
    hgrepos = []
    issue_num = 32355
    keywords = ['patch']
    message_count = 2.0
    messages = ['308508', '308632']
    nosy_count = 2.0
    nosy_names = ['asvetlov', 'yselivanov']
    pr_nums = ['4913']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue32355'
    versions = ['Python 3.7']

    @1st1
    Copy link
    Member Author

    1st1 commented Dec 18, 2017

    asyncio.gather can be made faster if:

    1. we don't use functools.partial
    2. create less intermittent collections
    3. drop unnecessary code (e.g. gather has some code that's duplicated in ensure_future that it uses etc)

    The proposed PR makes asyncio.gather 10-15% faster on the attached benchmark.

    @1st1 1st1 added the 3.7 (EOL) end of life label Dec 18, 2017
    @1st1 1st1 self-assigned this Dec 18, 2017
    @1st1 1st1 added topic-asyncio performance Performance or resource usage labels Dec 18, 2017
    @1st1
    Copy link
    Member Author

    1st1 commented Dec 19, 2017

    New changeset 36c2c04 by Yury Selivanov in branch 'master':
    bpo-32355: Optimize asyncio.gather() (bpo-4913)
    36c2c04

    @1st1 1st1 closed this as completed Dec 19, 2017
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life performance Performance or resource usage topic-asyncio
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant