MD Extensions: Drop unnecessary work when first populating the list.
During initial population of the extensions and apps lists, addItem() was called N times, which internally performs a linear search N times, as well as triggres splice() notifications that are unnecessary. As revealed by DevTools (for a total of 30 extensions and apps): - before: the N calls to addItem() were taking ~22ms total - after: The initialization of the lists takes ~5ms total Bug: 764126 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: If66d752cd3e7ac4b4ecd01ea4964ca6fd8d8f0db Reviewed-on: https://chromium-review.googlesource.com/746967Reviewed-by:Dave Schuyler <dschuyler@chromium.org> Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#512989}
Showing
Please register or sign in to comment