Chrome Mac locks up on profiles with large numbers of bookmarks
Reported by
si...@wallace-online.com,
Jun 16 2017
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4 Steps to reproduce the problem: 1. Go to a web page 2. Go to a text input dialog box 3. Enter text What is the expected behavior? Text should appear as I type it What went wrong? Browser locks up for a couple of minutes whilst typing. Takes about 2 minutes for text to appear in dialog box. See https://productforums.google.com/forum/#!topic/chrome/9bb8WhrFLVA;context-place=topicsearchin/chrome/symowallo for full back story. Occurring on 2 Macs that I sign into. Did this work before? N/A Chrome version: Google Chrome 59.0.3071.104 (Official Build) (64-bit) Revision 1c037b7399035b4209e72455256615e8972493aa-refs/branch-heads/3071@{#790} OS Mac OS X JavaScript V8 5.9.211.35 Flash 26.0.0.126 /Users/simon/Library/Application Support/Google/Chrome/PepperFlash/26.0.0.126/PepperFlashPlayer.plugin User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36 Command Line /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --flag-switches-begin --flag-switches-end Executable Path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome Profile Path /Users/simon/Library/Application Support/Google/Chrome/Default Channel: stable OS Version: OS X 10.12.5 Flash Version: See thread for full history... Have searched. Thought it was the input locale so changed it back to generic English (US). No change. I suspect my profile.
,
Jun 18 2017
,
Jun 18 2017
Thank you for providing more feedback. Adding requester "tapted@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 18 2017
I should also add: the lockups occur on Google-based apps too (I'm using Betaflight Configurator and BLHeli Configurator). Lockups whenever moving controls on GUIs or entering text. The attachments were from when I was trying to type in text on a couple of web pages. It's now occurring on another Mac that I use, same Google profile.
,
Jun 18 2017
Thanks! That's super helpful. It looks like all the time is being spent building the Bookmarks menu in response to (one or more) key events. This has come up in Issue 603881 and Issue 647183 . But the Bookmarks menu should only update once, and then be valid until Chrome is restarted or a bookmark is added or removed. If this happens regularly without Chrome restarting, it could be caused by an extension doing bookmark management in the background. But also just having a lot of bookmarks (like, many thousands of bookmarks) would cause this at least once per Chrome start, which isn't nice. To resolve this for you, deleting a bunch of bookmarks is probably the quickest way (e.g. after Exporting them to a file - https://support.google.com/chrome/answer/96816 ). But there is probably something we can do to improve this on Mac. Call graph: 1439 Thread_28325 DispatchQueue_1: com.apple.main-thread (serial) + 1438 start (in libdyld.dylib) + 1 [0x7fffb4060235] + ! 1438 main (in Google Chrome) + 522 [chrome_exe_main_mac.c:89] + ! 1438 ChromeMain (in Google Chrome Framework) + 111 [chrome_main.cc:0] + ! 1438 content::ContentMain(content::ContentMainParams const&) (in Google Chrome Framework) load address 0x105dea000 + 0x1599156 [content_main.cc:20] + ! 1438 content::ContentMainRunnerImpl::Run() (in Google Chrome Framework) load address 0x105dea000 + 0x1599e40 [content_main_runner.cc:836] + ! 1438 content::BrowserMain(content::MainFunctionParams const&) (in Google Chrome Framework) load address 0x105dea000 + 0x4ade7c [browser_main.cc:46] + ! 1438 content::BrowserMainRunnerImpl::Run() (in Google Chrome Framework) load address 0x105dea000 + 0x4b5222 [memory:2586] + ! 1438 content::BrowserMainLoop::RunMainMessageLoopParts() (in Google Chrome Framework) load address 0x105dea000 + 0x4b2274 [browser_main_loop.cc:1185] + ! 1438 ChromeBrowserMainParts::MainMessageLoopRun(int*) (in Google Chrome Framework) load address 0x105dea000 + 0x15e1889 [chrome_browser_main.cc:2009] + ! 1438 base::RunLoop::Run() (in Google Chrome Framework) load address 0x105dea000 + 0x1a5f8a3 [run_loop.cc:38] + ! 1438 base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) (in Google Chrome Framework) load address 0x105dea000 + 0x1a412cc [message_pump_mac.mm:300] + ! 1438 base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) (in Google Chrome Framework) load address 0x105dea000 + 0x1a41cae [message_pump_mac.mm:772] + ! 1438 -[NSApplication run] (in AppKit) + 926 [0x7fff9c3d53db] + ! 1438 -[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in Google Chrome Framework) load address 0x105dea000 + 0x15dba49 [chrome_browser_application_mac.mm:192] + ! 1438 base::mac::CallWithEHFrame(void () block_pointer) (in Google Chrome Framework) load address 0x105dea000 + 0x1a31d6a [] + ! 1438 __71-[BrowserCrApplication nextEventMatchingMask:untilDate:inMode:dequeue:]_block_invoke (in Google Chrome Framework) load address 0x105dea000 + 0x15dbb10 [chrome_browser_application_mac.mm:187] + ! 1438 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit) + 2796 [0x7fff9cb5c7ee] + ! 1438 _DPSNextEvent (in AppKit) + 1120 [0x7fff9c3e0a54] + ! 1438 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox) + 71 [0x7fff9de47b26] + ! 1438 ReceiveNextEventCommon (in HIToolbox) + 432 [0x7fff9de47cf1] + ! 1438 RunCurrentEventLoopInMode (in HIToolbox) + 240 [0x7fff9de47ebc] + ! 1438 CFRunLoopRunSpecific (in CoreFoundation) + 420 [0x7fff9e8e6114] + ! 1438 __CFRunLoopRun (in CoreFoundation) + 934 [0x7fff9e8e6716] + ! 1438 __CFRunLoopDoSources0 (in CoreFoundation) + 557 [0x7fff9e8e721d] + ! 1438 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (in CoreFoundation) + 17 [0x7fff9e906321] + ! 1438 base::MessagePumpCFRunLoopBase::RunWorkSource(void*) (in Google Chrome Framework) load address 0x105dea000 + 0x1a40e94 [message_pump_mac.mm:399] + ! 1438 base::mac::CallWithEHFrame(void () block_pointer) (in Google Chrome Framework) load address 0x105dea000 + 0x1a31d6a [] + ! 1438 base::MessagePumpCFRunLoopBase::RunWork() (in Google Chrome Framework) load address 0x105dea000 + 0x1a4146a [message_pump_mac.mm:420] + ! 1438 base::MessageLoop::DoWork() (in Google Chrome Framework) load address 0x105dea000 + 0x1a3e053 [message_loop.cc:527] + ! 1438 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) (in Google Chrome Framework) load address 0x105dea000 + 0x1a3dc8c [message_loop.cc:434] + ! 1438 base::MessageLoop::RunTask(base::PendingTask*) (in Google Chrome Framework) load address 0x105dea000 + 0x1a3d93b [vector:638] + ! 1438 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) (in Google Chrome Framework) load address 0x105dea000 + 0x1a17e80 [callback_forward.h:29] + ! 1438 IPC::ChannelProxy::Context::OnDispatchMessage(IPC::Message const&) (in Google Chrome Framework) load address 0x105dea000 + 0x1fbb2cb [ipc_message.h:129] + ! 1438 content::RenderWidgetHostImpl::OnMessageReceived(IPC::Message const&) (in Google Chrome Framework) load address 0x105dea000 + 0x724157 [render_widget_host_impl.cc:578] + ! 1438 content::InputRouterImpl::OnMessageReceived(IPC::Message const&) (in Google Chrome Framework) load address 0x105dea000 + 0x6bb0a2 [input_router_impl.cc:255] + ! 1438 bool IPC::MessageT<InputHostMsg_HandleInputEvent_ACK_Meta, std::__1::tuple<content::InputEventAck>, void>::Dispatch<content::InputRouterImpl, content::InputRouterImpl, void, void (content::InputRouterImpl::*)(content::InputEventAck const&)>(IPC::Message const*, content::InputRouterImpl*, content::InputRouterImpl*, void*, void (content::InputRouterImpl::*)(content::InputEventAck const&)) (in Google Chrome Framework) load address 0x105dea000 + 0x6bb5fe [tuple.h:0] + ! 1438 content::InputRouterImpl::ProcessInputEventAck(blink::WebInputEvent::Type, content::InputEventAckState, ui::LatencyInfo const&, unsigned int, content::InputRouterImpl::AckSource) (in Google Chrome Framework) load address 0x105dea000 + 0x6bc994 [trace_event.h:1033] + ! 1438 content::InputRouterImpl::ProcessKeyboardAck(blink::WebInputEvent::Type, content::InputEventAckState, ui::LatencyInfo const&) (in Google Chrome Framework) load address 0x105dea000 + 0x6bcd7e [event_with_latency_info.h:21] + ! 1438 content::RenderWidgetHostImpl::OnKeyboardEventAck(content::EventWithLatencyInfo<content::NativeWebKeyboardEvent> const&, content::InputEventAckState) (in Google Chrome Framework) load address 0x105dea000 + 0x72c821 [render_widget_host_impl.cc:2182] + ! 1438 BrowserWindowCocoa::HandleKeyboardEvent(content::NativeWebKeyboardEvent const&) (in Google Chrome Framework) load address 0x105dea000 + 0x3fe8c62 [browser_window_cocoa.mm:730] + ! 1438 +[BrowserWindowUtils handleKeyboardEvent:inWindow:] (in Google Chrome Framework) load address 0x105dea000 + 0x3ff66f1 [browser_window_utils.mm:64] + ! 1438 -[NSMenu performKeyEquivalent:] (in AppKit) + 141 [0x7fff9c630103] + ! 1438 _NSFindMenuItemMatchingCommandKeyEvent (in AppKit) + 311 [0x7fff9c57107b] + ! 1438 +[NSCarbonMenuImpl _menuItemWithKeyEquivalentMatchingEventRef:inMenu:includingDisabledItems:] (in AppKit) + 357 [0x7fff9c87d2d7] + ! 1438 IsMenuKeyEvent (in HIToolbox) + 110 [0x7fff9de65775] + ! 1438 _IsMenuKeyEvent(MenuData*, OpaqueEventRef*, unsigned int, MenuData**, unsigned short*) (in HIToolbox) + 568 [0x7fff9de659ed] + ! 1438 CheckMenusForKeyEvent(MenuData*, CheckMenuData*) (in HIToolbox) + 884 [0x7fff9de65e7f] + ! 1438 Check1MenuForKeyEvent(MenuData*, CheckMenuData*) (in HIToolbox) + 278 [0x7fff9de6696a] + ! 1438 PopulateMenu(MenuData*, OpaqueEventTargetRef*, CheckMenuData*, unsigned int, double) (in HIToolbox) + 90 [0x7fff9de67246] + ! 1438 SendMenuPopulate(MenuData*, OpaqueEventTargetRef*, unsigned int, double, unsigned int, OpaqueEventRef*, unsigned char, unsigned char*) (in HIToolbox) + 320 [0x7fff9de674a9] + ! 1438 SendEventToEventTargetWithOptions (in HIToolbox) + 43 [0x7fff9de1ee3f] + ! 1438 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) (in HIToolbox) + 428 [0x7fff9de1eff6] + ! 1438 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) (in HIToolbox) + 1708 [0x7fff9de1fd85] + ! 1438 NSSLMMenuEventHandler (in AppKit) + 1093 [0x7fff9c5715eb] + ! 1438 -[NSCarbonMenuImpl _carbonPopulateEvent:handlerCallRef:] (in AppKit) + 468 [0x7fff9c5718b5] + ! 1438 -[NSMenu _populateWithEventRef:] (in AppKit) + 84 [0x7fff9c56f079] + ! 1438 -[NSMenu _populateFromDelegateWithEventRef:] (in AppKit) + 334 [0x7fff9c57275e] + ! 1438 BookmarkMenuBridge::UpdateMenuInternal(NSMenu*, bool) (in Google Chrome Framework) load address 0x105dea000 + 0x3f9c298 [bookmark_model.h:105] + ! 1430 BookmarkMenuBridge::AddNodeToMenu(bookmarks::BookmarkNode const*, NSMenu*, bool) (in Google Chrome Framework) load address 0x105dea000 + 0x3f9c8cd [bookmark_menu_bridge.mm:281] + ! : 662 BookmarkMenuBridge::AddNodeToMenu(bookmarks::BookmarkNode const*, NSMenu*, bool) (in Google Chrome Framework) load address 0x105dea000 + 0x3f9c8cd [bookmark_menu_bridge.mm:281] + ! : | 430 BookmarkMenuBridge::AddNodeToMenu(bookmarks::BookmarkNode const*, NSMenu*, bool) (in Google Chrome Framework) load address 0x105dea000 + 0x3f9c739 [bookmark_menu_bridge.mm:270] + ! : | + 427 +[BookmarkMenuCocoaController menuTitleForNode:] (in Google Chrome Framework) load address 0x105dea000 + 0x3f9cfc9 [bookmark_menu_cocoa_controller.mm:41] + ! : | + ! 418 +[MenuController elideMenuTitle:toWidth:] (in Google Chrome Framework) load address 0x105dea000 + 0x240ed76 [menu_controller.mm:0] + ! : | + ! : 413 gfx::ElideText(std::__1::basic_string<unsigned short, base::string16_char_traits, std::__1::allocator<unsigned short> > const&, gfx::FontList const&, float, gfx::ElideBehavior) (in Google Chrome Framework) load address 0x105dea000 + 0x1ff08cd [text_elider.cc:213] .. + ! : | 56 BookmarkMenuBridge::AddNodeToMenu(bookmarks::BookmarkNode const*, NSMenu*, bool) (in Google Chrome Framework) load address 0x105dea000 + 0x3f9c8e1 [bookmark_menu_bridge.mm:283] .. + ! : 578 BookmarkMenuBridge::AddNodeToMenu(bookmarks::BookmarkNode const*, NSMenu*, bool) (in Google Chrome Framework) load address 0x105dea000 + 0x3f9c739 [bookmark_menu_bridge.mm:270] + ! : | 569 +[BookmarkMenuCocoaController menuTitleForNode:] (in Google Chrome Framework) load address 0x105dea000 + 0x3f9cfc9 [bookmark_menu_cocoa_controller.mm:41] + ! : | + 513 +[MenuController elideMenuTitle:toWidth:] (in Google Chrome Framework) load address 0x105dea000 + 0x240ed76 [menu_controller.mm:0] + ! : | + ! 496 gfx::ElideText(std::__1::basic_string<unsigned short, base::string16_char_traits, std::__1::allocator<unsigned short> > const&, gfx::FontList const&, float, gfx::ElideBehavior) (in Google Chrome Framework) load address 0x105dea000 + 0x1ff08cd [text_elider.cc:213]
,
Jun 21 2017
YESSSSSS!!! That fixed it. I haven't been able to use Chrome for months because of this issue. My Bookmarks were 180MB in size and there were more than 233,000 of them! This came about because I've been running it for a long time across many different devices. It appears that the bookmark synching was creating duplicate folders, each one getting a (X) after the name, where X incrementing by 1 each time. I cleared them out from Google Dashboard (I was unable to export them, so I have lost them all). Unable to export because Chrome would hang at the bookmarks manager. But the main thing is that it works. It appears that the Windows version handled it better so it only became noticeable when I acquired a MacBook. Thanks for the resolution.
,
Jul 21 2017
Issue 743469 has been merged into this issue.
,
Nov 20 2017
I'm exploring lazy bookmark loading in https://chromium-review.googlesource.com/778644 After that, it seems it's enough just to `return NO` from -[NSMenuItem menuHasKeyEquivalent:]. If the menu is already populated, and there are items with key equivalents set, then they still trigger.
,
Nov 20 2017
(of course.. the upshot of that is that once the bookmarks menu *has* been fully built, AppKit will still ask every menu item uselessly whether it wants to handle the key. But the hope is that users with 10k+ bookmarks are not going to open up every bookmarks folder to populate the menus in the first place).
,
Nov 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cf95689a88664eb44716632cc7320d18ed3324ba commit cf95689a88664eb44716632cc7320d18ed3324ba Author: Trent Apted <tapted@chromium.org> Date: Wed Nov 22 00:01:10 2017 Mac: Lazily populate bookmarks menus. Currently the first time you press a key (any key) in WebContent on Chrome Mac, Chrome makes a NSMenuItem for every bookmark you have, and spawns tasks to convert each favicon. These then persist in memory to service the Bookmarks menu on the menubar. On my profile with ~1000 bookmarks, Chrome jumps from 95MB to 105MB resident memory if I open about:blank and press a key. And there is noticeable lag. Each browser window's App menu also has a full bookmarks tree, populated once the 'Bookmarks' item is hovered over, and persisted in memory; taking up about 800kB (approximately doubling the browser process memory used by a single-tab browser window). In order to populate these lazily, the bookmarks menu must respond `NO` to -[NSMenuDelegate menuHasKeyEquivalent:..]. Otherwise the menu is fully populated on the first key event to see if any bookmark titles match the event. With this in place, we can leave all bookmarks submenus empty, but set a delegate that AppKit uses to populate the menu when the user first shows it. Bug: 33102 , 647183 , 733921 , 786845 Change-Id: Idc0a28cf9483f7161dc3fbe9bd6cda717e65de98 Reviewed-on: https://chromium-review.googlesource.com/778644 Commit-Queue: Trent Apted <tapted@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Cr-Commit-Position: refs/heads/master@{#518459} [modify] https://crrev.com/cf95689a88664eb44716632cc7320d18ed3324ba/chrome/browser/app_controller_mac.mm [modify] https://crrev.com/cf95689a88664eb44716632cc7320d18ed3324ba/chrome/browser/app_controller_mac_browsertest.mm [modify] https://crrev.com/cf95689a88664eb44716632cc7320d18ed3324ba/chrome/browser/ui/cocoa/app_menu/app_menu_controller.mm [modify] https://crrev.com/cf95689a88664eb44716632cc7320d18ed3324ba/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h [modify] https://crrev.com/cf95689a88664eb44716632cc7320d18ed3324ba/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm [modify] https://crrev.com/cf95689a88664eb44716632cc7320d18ed3324ba/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge_unittest.mm [modify] https://crrev.com/cf95689a88664eb44716632cc7320d18ed3324ba/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.h [modify] https://crrev.com/cf95689a88664eb44716632cc7320d18ed3324ba/chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.mm
,
Nov 23 2017
#c10 addresses the bulk of the slowness identified in #c5, so long as the user hasn't opened up all their bookmarks folders via the Bookmarks mainMenu item already. This is because even returning `NO` from -[NSMenuDelegate menuHasKeyEquivalent:..] doesn't convince AppKit to stop asking any *already-populated* items in the menu whether they want to respond to the key event. (which is good, I suppose?) See Issue 33102 for possible future improvements.
,
Jan 31 2018
I can confirm that this is fixed now. Thank you! |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by tapted@chromium.org
, Jun 16 2017