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

Imaplib speedup patch #46481

Closed
aaronkaplan mannequin opened this issue Mar 3, 2008 · 5 comments
Closed

Imaplib speedup patch #46481

aaronkaplan mannequin opened this issue Mar 3, 2008 · 5 comments
Labels
performance Performance or resource usage stdlib Python modules in the Lib dir

Comments

@aaronkaplan
Copy link
Mannequin

aaronkaplan mannequin commented Mar 3, 2008

BPO 2228
Nosy @pitrou, @sandrotosi
Files
  • imaplib-patch
  • 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 = None
    closed_at = <Date 2011-02-10.21:58:21.595>
    created_at = <Date 2008-03-03.21:42:06.077>
    labels = ['library', 'performance']
    title = 'Imaplib speedup patch'
    updated_at = <Date 2011-02-10.21:58:21.592>
    user = 'https://bugs.python.org/aaronkaplan'

    bugs.python.org fields:

    activity = <Date 2011-02-10.21:58:21.592>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2011-02-10.21:58:21.595>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2008-03-03.21:42:06.077>
    creator = 'aaronkaplan'
    dependencies = []
    files = ['9597']
    hgrepos = []
    issue_num = 2228
    keywords = ['patch']
    message_count = 5.0
    messages = ['63237', '64151', '128244', '128284', '128342']
    nosy_count = 5.0
    nosy_names = ['jafo', 'pierslauder', 'pitrou', 'aaronkaplan', 'sandro.tosi']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue2228'
    versions = ['Python 3.3']

    @aaronkaplan
    Copy link
    Mannequin Author

    aaronkaplan mannequin commented Mar 3, 2008

    In some versions of John Goergen's program offlineimap, he includes a
    copy of imaplib.py with the attached changes. It results in a speedup
    of more than 50% compared to using the stock imaplib.py.

    @aaronkaplan aaronkaplan mannequin added the performance Performance or resource usage label Mar 3, 2008
    @jafo
    Copy link
    Mannequin

    jafo mannequin commented Mar 20, 2008

    This patch buffers data inside imaplib, so if anything else wants to use
    the socket it may generate surprises. Piers?

    @jafo jafo mannequin assigned pierslauder Mar 20, 2008
    @techtonik techtonik mannequin added stdlib Python modules in the Lib dir performance Performance or resource usage and removed performance Performance or resource usage labels Apr 6, 2010
    @sandrotosi
    Copy link
    Contributor

    Sean, could you please explain a bit more what are your concerns about this patch?

    Anyhow, the code has slightly changed and currently John is not maintaining offlineimap anymore, but what seems the most recent version can be found at: https://github.com/nicolas33/offlineimap/

    @aaronkaplan
    Copy link
    Mannequin Author

    aaronkaplan mannequin commented Feb 10, 2011

    Let me clarify. Offlineimap used to ship a modified version of imaplib in its distribution, but eventually the author decided he no longer wanted to maintain his imaplib fork, so he dropped it and went with stock imaplib (at a significant performance penalty). The patch I submitted here is the difference between the forked imaplib circa 2007 and the upstream version it was forked from. The current version of offlineimap is not relevant to this issue, because it no longer contains any imaplib code.

    @pitrou
    Copy link
    Member

    pitrou commented Feb 10, 2011

    The part which is replaced by that patch (the readline() method in IMAP4_SSL) doesn't exist anymore in current imaplib code. Instead the file-like object created by socket.makefile() is used; its readline() method is probably quite faster than any pure Python implementation.

    @pitrou pitrou closed this as completed Feb 10, 2011
    @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
    performance Performance or resource usage stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants