[about-omnibox] Performance refactoring of omnibox.js: split refresh method,...
[about-omnibox] Performance refactoring of omnibox.js: split refresh method, extract inlined dom elements, and improved html output clearing. 1. Split `refresh` into `refreshAllResults` and `refreshNewResult` for performance reasons as explained in the comments (tldr, refreshing entire output is unnecessary when we only need to add to the output). 2. Extract variables for inlined expressions to retrieve document elements. 3. Use `Element.removeChild` instead of `Element.innerHTML = ` to clear output Change-Id: Ia7085d97537c5f445c950ecb50f35e5880b6124a Reviewed-on: https://chromium-review.googlesource.com/1246295 Commit-Queue: manuk hovanesian <manukh@chromium.org> Reviewed-by:Tommy Li <tommycli@chromium.org> Cr-Commit-Position: refs/heads/master@{#594820}
Showing
Please register or sign in to comment