librelist archives

« back to archive

[MailCore/mailcore2] ec1da3: Add an operation to fetch a parsed message.

[MailCore/mailcore2] ec1da3: Add an operation to fetch a parsed message.

From:
Hoà V. Dinh
Date:
2014-10-25 @ 22:33
  Branch: refs/heads/master
  Home:   https://github.com/MailCore/mailcore2
  Commit: ec1da36eaf2adfb5695f5c0d8ca92d23d31b56a5
      
https://github.com/MailCore/mailcore2/commit/ec1da36eaf2adfb5695f5c0d8ca92d23d31b56a5
  Author: Michael Lenaghan <michaell@dazzit.com>
  Date:   2014-10-24 (Fri, 24 Oct 2014)

  Changed paths:
    M build-mac/mailcore2.xcodeproj/project.pbxproj
    M src/async/imap/MCAsyncIMAP.h
    M src/async/imap/MCIMAPAsyncConnection.cc
    M src/async/imap/MCIMAPAsyncConnection.h
    M src/async/imap/MCIMAPAsyncSession.cc
    M src/async/imap/MCIMAPAsyncSession.h
    A src/async/imap/MCIMAPFetchParsedContentOperation.cc
    A src/async/imap/MCIMAPFetchParsedContentOperation.h
    M src/cmake/async.cmake
    M src/cmake/objc.cmake
    M src/cmake/public-headers.cmake
    M src/objc/imap/MCOIMAP.h
    A src/objc/imap/MCOIMAPFetchParsedContentOperation.h
    A src/objc/imap/MCOIMAPFetchParsedContentOperation.mm
    M src/objc/imap/MCOIMAPSession.h
    M src/objc/imap/MCOIMAPSession.mm

  Log Message:
  -----------
  Add an operation to fetch a parsed message.

This avoids the copying of Data to NSData to Data which happens with the 
current approach. In one test case, a message with an ~18 MB attachment, 
the current (copying) approach peaked at ~150 MB of memory usage in my 
app. This new approach peaks at ~65 MB. Another test case, which often 
caused iOS to terminate my app, now peaks at ~90 MB. In addition to the 
improved memory usage this approach also means that message parsing is 
performed asynchronously.


  Commit: 8caeae6e162faed40eb3ae2dce1a654789eff01c
      
https://github.com/MailCore/mailcore2/commit/8caeae6e162faed40eb3ae2dce1a654789eff01c
  Author: Hoà V. DINH <dinh.viet.hoa@gmail.com>
  Date:   2014-10-25 (Sat, 25 Oct 2014)

  Changed paths:
    M build-mac/mailcore2.xcodeproj/project.pbxproj
    M src/async/imap/MCAsyncIMAP.h
    M src/async/imap/MCIMAPAsyncConnection.cc
    M src/async/imap/MCIMAPAsyncConnection.h
    M src/async/imap/MCIMAPAsyncSession.cc
    M src/async/imap/MCIMAPAsyncSession.h
    A src/async/imap/MCIMAPFetchParsedContentOperation.cc
    A src/async/imap/MCIMAPFetchParsedContentOperation.h
    M src/cmake/async.cmake
    M src/cmake/objc.cmake
    M src/cmake/public-headers.cmake
    M src/objc/imap/MCOIMAP.h
    A src/objc/imap/MCOIMAPFetchParsedContentOperation.h
    A src/objc/imap/MCOIMAPFetchParsedContentOperation.mm
    M src/objc/imap/MCOIMAPSession.h
    M src/objc/imap/MCOIMAPSession.mm

  Log Message:
  -----------
  Merge pull request #933 from michaellenaghan/fetch-parsed-message-operation

Add an operation to fetch a parsed message.


Compare: https://github.com/MailCore/mailcore2/compare/97de9211f38b...8caeae6e162f