1. 22 Nov, 2017 2 commits
    • Trent Apted's avatar
      Mac: Lazily populate bookmarks menus. · cf95689a
      Trent Apted authored
      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: default avatarRobert Sesek <rsesek@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#518459}
      cf95689a
    • Tsuyoshi Horo's avatar
      Clear CachedMetadataHandler when the response URL is not HTTP family. · f2908761
      Tsuyoshi Horo authored
      BUG=782793
      
      Change-Id: I92c16d68cd47d7c20b241420ff3264188a49b6c2
      Reviewed-on: https://chromium-review.googlesource.com/773720Reviewed-by: default avatarYutaka Hirano <yhirano@chromium.org>
      Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
      Reviewed-by: default avatarDominic Battré <battre@chromium.org>
      Reviewed-by: default avatarTsuyoshi Horo <horo@chromium.org>
      Commit-Queue: Tsuyoshi Horo <horo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#518458}
      f2908761
  2. 21 Nov, 2017 38 commits