Short-circuit regex logic in AutocompleteInput::Parse for non-js scheme The regex is notably more expensive than a simple string comparison, and isn't necessary unless the scheme (which we already know) is javascript, so we can avoid the expense in most cases. Local testing on an Android emulator (release build) showed a 4x speedup for Parse(), improving from 0.2ms average to 0.05ms. This adds up to a full ms of delay when loading a url, since we call parse() five times while generating the url bar data. Bug: none Change-Id: I6427e7b2a4ddbd9e4c362707df659d776e66e743 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3923871 Reviewed-by: Travis Skare <skare@chromium.org> Reviewed-by: Justin Donnelly <jdonnelly@chromium.org> Commit-Queue: Patrick Noland <pnoland@chromium.org> Cr-Commit-Position: refs/heads/main@{#1053769}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.