Closed
Description
openedon Oct 31, 2021
Steps to reproduce:
- Visit https://doc.rust-lang.org/nightly/std/string/trait.ToString.html?search=foo
- In Chrome Developer Tools, select Sources > search1.58.0.js
- Use the
{ }
in the lower right of that panel to pretty-print - Use search to find
function search()
. - Add a breakpoint by clicking the line number to the left of the function>
- Reload the page.
- Hit F8 (resume script execution) as many times as necessary for the page to finish loading.
Expected result: Hit F8 only once.
Actual result: Hit F8 twice.
This is relevant because search is a CPU-intensive operation and blocks the UI thread. Doing it twice is a bad user experience.
This is a category of bug we've had at least once before. Rather the fix it by repairing the specific sequence of events that causes it, perhaps we should do some sort of memoization so that if search()
is called for an input that is already displayed on the page, we don't actually execute the search again.
/cc @GuillaumeGomez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment