MacOS – Messages on OS X very slow to start

macosmessages

Latest OS X version 10.10.3

For the past few weeks my Messages app takes forever to open – about 20 bounces in the dock before it finally opens, if it was quit. Then it works fine until I quit and reopen it again.

Why / how to fix?

Console entries when I first click to open Messages:

5/14/15 4:12:05.682 PM com.apple.xpc.launchd[1]: (com.apple.imfoundation.IMRemoteURLConnectionAgent) The _DirtyJetsamMemoryLimit key is not available on this platform.
5/14/15 4:12:05.727 PM Messages[2544]: schema version 8010

Then after about 20-25 seconds Messages opens and these entries show up:

5/14/15 4:12:19.966 PM Messages[2544]: [Warning] A window restoration handler (stored in sRestoreWindowStateArray) was left dangling
5/14/15 4:12:20.238 PM Messages[2544]: [Warning] ** Cannot change recipient from 0x7ff6aec1be50 - ID: friend2@example.com person: <IMPerson> (Name: My Friend Name) MyFriend F [789A8068-2B12-4010-9F63-C46BA1B02BC2:ABPerson], [Presentity: <friend2@example.com:<None>:US> (Person: <IMPerson> (Name: My Friend Name) MyFriend F [789A8068-2B12-4010-9F63-C46BA1B02BC2:ABPerson]) (Account: E:phil@example.com] => 0x7ff6afa6baf0 - ID: philF@gmail.com person: <IMPerson> (Name: Phil F) Phil F [7193437C-FD3A-4D20-82D8-9E6BDCFB0186:ABPerson], [Presentity: <philF@gmail.com:philF:US> (Person: <IMPerson> (Name: Phil F) Phil F [7193437C-FD3A-4D20-82D8-9E6BDCFB0186:ABPerson]) (Account: Gmail], this is not a chat sibling
5/14/15 4:12:20.238 PM Messages[2544]: [Warning] ** Cannot change recipient from 0x7ff6aec1be50 - ID: friend2@example.com person: <IMPerson> (Name: My Friend Name) MyFriend F [789A8068-2B12-4010-9F63-C46BA1B02BC2:ABPerson], [Presentity: <friend2@example.com:<None>:US> (Person: <IMPerson> (Name: My Friend Name) MyFriend F [789A8068-2B12-4010-9F63-C46BA1B02BC2:ABPerson]) (Account: E:phil@example.com] => 0x7ff6afa6baf0 - ID: philF@gmail.com person: <IMPerson> (Name: Phil F) Phil F [7193437C-FD3A-4D20-82D8-9E6BDCFB0186:ABPerson], [Presentity: <philF@gmail.com:philF:US> (Person: <IMPerson> (Name: Phil F) Phil F [7193437C-FD3A-4D20-82D8-9E6BDCFB0186:ABPerson]) (Account: Gmail], this is not a chat sibling
5/14/15 4:12:21.665 PM Messages[2544]: [Warning] Calling imageDataBlocking from thread other than main thread.
(
    0   IMRenderingFoundation               0x00007fff8a6d1983 -[IMPerson(IMRenderingUtilities) imageDataBlocking] + 99
    1   IMRenderingFoundation               0x00007fff8a6d08ab -[Presentity customPicture] + 224
    2   IMRenderingFoundation               0x00007fff8a6d01d3 -[IMHandle(IMRenderingUtilities) monogramWithDiameter:style:blocking:] + 539
    3   IMRenderingFoundation               0x00007fff8a6dcf12 -[TranscriptImageResourceProtocol requestResourceData:fromURL:] + 9964
    4   IMRenderingFoundation               0x00007fff8a6da72b -[TranscriptImageResourceProtocol startLoading] + 140
    5   CFNetwork                           0x00007fff90cded94 ___ZN19URLConnectionLoader27_private_ScheduleOriginLoadEPK12NSURLRequestPK20_CFCachedURLResponse_block_invoke_2 + 61
    6   CFNetwork                           0x00007fff90cded2b ___ZNK19URLConnectionLoader25withExistingProtocolAsyncEU13block_pointerFvP11URLProtocolE_block_invoke + 25
    7   CFNetwork                           0x00007fff90cdecec _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 72
    8   CoreFoundation                      0x00007fff8a77b664 CFArrayApplyFunction + 68
    9   CFNetwork                           0x00007fff90cdebad _ZN19RunloopBlockContext7performEv + 133
    10  CFNetwork                           0x00007fff90cde998 _ZN17MultiplexerSource7performEv + 282
    11  CFNetwork                           0x00007fff90cde7ba _ZN17MultiplexerSource8_performEPv + 72
    12  CoreFoundation                      0x00007fff8a7afa01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    13  CoreFoundation                      0x00007fff8a7a1b8d __CFRunLoopDoSources0 + 269
    14  CoreFoundation                      0x00007fff8a7a11bf __CFRunLoopRun + 927
    15  CoreFoundation                      0x00007fff8a7a0bd8 CFRunLoopRunSpecific + 296
    16  CFNetwork                           0x00007fff90cd1220 +[NSURLConnection(Loader) _resourceLoadLoop:] + 434
    17  Foundation                          0x00007fff96cf8dc2 __NSThread__main__ + 1345
    18  libsystem_pthread.dylib             0x00007fff96c0e268 _pthread_body + 131
    19  libsystem_pthread.dylib             0x00007fff96c0e1e5 _pthread_body + 0
    20  libsystem_pthread.dylib             0x00007fff96c0c41d thread_start + 13
)
5/14/15 4:12:21.690 PM Messages[2544]: [Warning] Calling imageDataBlocking from thread other than main thread.
(
    0   IMRenderingFoundation               0x00007fff8a6d1983 -[IMPerson(IMRenderingUtilities) imageDataBlocking] + 99
    1   IMRenderingFoundation               0x00007fff8a6d08ab -[Presentity customPicture] + 224
    2   IMRenderingFoundation               0x00007fff8a6d01d3 -[IMHandle(IMRenderingUtilities) monogramWithDiameter:style:blocking:] + 539
    3   IMRenderingFoundation               0x00007fff8a6dcf12 -[TranscriptImageResourceProtocol requestResourceData:fromURL:] + 9964
    4   IMRenderingFoundation               0x00007fff8a6da72b -[TranscriptImageResourceProtocol startLoading] + 140
    5   CFNetwork                           0x00007fff90cded94 ___ZN19URLConnectionLoader27_private_ScheduleOriginLoadEPK12NSURLRequestPK20_CFCachedURLResponse_block_invoke_2 + 61
    6   CFNetwork                           0x00007fff90cded2b ___ZNK19URLConnectionLoader25withExistingProtocolAsyncEU13block_pointerFvP11URLProtocolE_block_invoke + 25
    7   CFNetwork                           0x00007fff90cdecec _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 72
    8   CoreFoundation                      0x00007fff8a77b664 CFArrayApplyFunction + 68
    9   CFNetwork                           0x00007fff90cdebad _ZN19RunloopBlockContext7performEv + 133
    10  CFNetwork                           0x00007fff90cde998 _ZN17MultiplexerSource7performEv + 282
    11  CFNetwork                           0x00007fff90cde7ba _ZN17MultiplexerSource8_performEPv + 72
    12  CoreFoundation                      0x00007fff8a7afa01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    13  CoreFoundation                      0x00007fff8a7a1b8d __CFRunLoopDoSources0 + 269
    14  CoreFoundation                      0x00007fff8a7a11bf __CFRunLoopRun + 927
    15  CoreFoundation                      0x00007fff8a7a0bd8 CFRunLoopRunSpecific + 296
    16  CFNetwork                           0x00007fff90cd1220 +[NSURLConnection(Loader) _resourceLoadLoop:] + 434
    17  Foundation                          0x00007fff96cf8dc2 __NSThread__main__ + 1345
    18  libsystem_pthread.dylib             0x00007fff96c0e268 _pthread_body + 131
    19  libsystem_pthread.dylib             0x00007fff96c0e1e5 _pthread_body + 0
    20  libsystem_pthread.dylib             0x00007fff96c0c41d thread_start + 13
)
5/14/15 4:12:21.705 PM Messages[2544]: [Warning] Calling cachedImageData from thread other than main thread.
(
    0   IMRenderingFoundation               0x00007fff8a6d231b -[IMPerson(IMRenderingUtilities) cachedImageData] + 99
    1   IMRenderingFoundation               0x00007fff8a6d0827 -[Presentity customPicture] + 92
    2   IMRenderingFoundation               0x00007fff8a6d01d3 -[IMHandle(IMRenderingUtilities) monogramWithDiameter:style:blocking:] + 539
    3   IMRenderingFoundation               0x00007fff8a6dcf12 -[TranscriptImageResourceProtocol requestResourceData:fromURL:] + 9964
    4   IMRenderingFoundation               0x00007fff8a6da72b -[TranscriptImageResourceProtocol startLoading] + 140
    5   CFNetwork                           0x00007fff90cded94 ___ZN19URLConnectionLoader27_private_ScheduleOriginLoadEPK12NSURLRequestPK20_CFCachedURLResponse_block_invoke_2 + 61
    6   CFNetwork                           0x00007fff90cded2b ___ZNK19URLConnectionLoader25withExistingProtocolAsyncEU13block_pointerFvP11URLProtocolE_block_invoke + 25
    7   CFNetwork                           0x00007fff90cdecec _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 72
    8   CoreFoundation                      0x00007fff8a77b664 CFArrayApplyFunction + 68
    9   CFNetwork                           0x00007fff90cdebad _ZN19RunloopBlockContext7performEv + 133
    10  CFNetwork                           0x00007fff90cde998 _ZN17MultiplexerSource7performEv + 282
    11  CFNetwork                           0x00007fff90cde7ba _ZN17MultiplexerSource8_performEPv + 72
    12  CoreFoundation                      0x00007fff8a7afa01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    13  CoreFoundation                      0x00007fff8a7a1b8d __CFRunLoopDoSources0 + 269
    14  CoreFoundation                      0x00007fff8a7a11bf __CFRunLoopRun + 927
    15  CoreFoundation                      0x00007fff8a7a0bd8 CFRunLoopRunSpecific + 296
    16  CFNetwork                           0x00007fff90cd1220 +[NSURLConnection(Loader) _resourceLoadLoop:] + 434
    17  Foundation                          0x00007fff96cf8dc2 __NSThread__main__ + 1345
    18  libsystem_pthread.dylib             0x00007fff96c0e268 _pthread_body + 131
    19  libsystem_pthread.dylib             0x00007fff96c0e1e5 _pthread_body + 0
    20  libsystem_pthread.dylib             0x00007fff96c0c41d thread_start + 13
)
5/14/15 4:12:22.071 PM Messages[2544]: [Warning] Calling cachedImageData from thread other than main thread.
(
    0   IMRenderingFoundation               0x00007fff8a6d231b -[IMPerson(IMRenderingUtilities) cachedImageData] + 99
    1   IMRenderingFoundation               0x00007fff8a6d0827 -[Presentity customPicture] + 92
    2   IMRenderingFoundation               0x00007fff8a6d01d3 -[IMHandle(IMRenderingUtilities) monogramWithDiameter:style:blocking:] + 539
    3   IMRenderingFoundation               0x00007fff8a6dcf12 -[TranscriptImageResourceProtocol requestResourceData:fromURL:] + 9964
    4   IMRenderingFoundation               0x00007fff8a6da72b -[TranscriptImageResourceProtocol startLoading] + 140
    5   CFNetwork                           0x00007fff90cded94 ___ZN19URLConnectionLoader27_private_ScheduleOriginLoadEPK12NSURLRequestPK20_CFCachedURLResponse_block_invoke_2 + 61
    6   CFNetwork                           0x00007fff90cded2b ___ZNK19URLConnectionLoader25withExistingProtocolAsyncEU13block_pointerFvP11URLProtocolE_block_invoke + 25
    7   CFNetwork                           0x00007fff90cdecec _ZN19RunloopBlockContext13_invoke_blockEPKvPv + 72
    8   CoreFoundation                      0x00007fff8a77b664 CFArrayApplyFunction + 68
    9   CFNetwork                           0x00007fff90cdebad _ZN19RunloopBlockContext7performEv + 133
    10  CFNetwork                           0x00007fff90cde998 _ZN17MultiplexerSource7performEv + 282
    11  CFNetwork                           0x00007fff90cde7ba _ZN17MultiplexerSource8_performEPv + 72
    12  CoreFoundation                      0x00007fff8a7afa01 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    13  CoreFoundation                      0x00007fff8a7a1b8d __CFRunLoopDoSources0 + 269
    14  CoreFoundation                      0x00007fff8a7a11bf __CFRunLoopRun + 927
    15  CoreFoundation                      0x00007fff8a7a0bd8 CFRunLoopRunSpecific + 296
    16  CFNetwork                           0x00007fff90cd1220 +[NSURLConnection(Loader) _resourceLoadLoop:] + 434
    17  Foundation                          0x00007fff96cf8dc2 __NSThread__main__ + 1345
    18  libsystem_pthread.dylib             0x00007fff96c0e268 _pthread_body + 131
    19  libsystem_pthread.dylib             0x00007fff96c0e1e5 _pthread_body + 0
    20  libsystem_pthread.dylib             0x00007fff96c0c41d thread_start + 13
)
5/14/15 4:12:24.679 PM nsurlstoraged[465]: realpath() returned NULL for /Users/philfreo/Library/Caches/com.apple.icloud.fmfd

Best Answer

Since it works once it finally starts, it would indicate some network interface problems.

Start Terminal (located in your Utility folder) and type Nettop.

Now start Messages.

Switch to the Terminal window and Scroll down till you see Messages. Look at the information provided (like how much data in data out).

Also take look at the:

IMRemoteURLConn. it should disappear after a very short while (the log in is completed) but will only appear if you actually logged out of Messages.

and the

com.apple.iClou.

Here you will get a indication what is maybe slowing it down and could take corrective action.

If this did not resolve the problem lets reset the iMessages.

Open Finder
Hold the Option key, open the Go menu, select Library
Select the Library and then open Preferences
Find: com.apple.imagent.plist, com.apple.imessage.bag.plist, as well as com.apple.imservice.iMessage.plist drag these to the Trash.
Restart the computer as IMAgent starts up when the computer boots