New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 679422 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Consider adding an ASCII fast path for URL parsing

Project Member Reported by csharrison@chromium.org, Jan 9 2017

Issue description

Blink URLs have a cached bit indicating whether they contain only ASCII characters. This bit is always (currently) available by the time we initialize a KURL. If we forward this bit in some way to the URL parser, we could dramatically improve some parsing work. 

Namely, "path" URLs (data, javascript) would benefit from this a lot. Path URLs leave all ascii characters alone, while escaping all non ascii utf-8 characters. 

A brief perf test shows that for a ~1.5MB data URL, altering DoCanonicalizePathComponent to simply Append the source without doing any utf-8 checks results in a ~40% improvement of a total KURL::init (which is the bottleneck for data image URLs).

I haven't looked at other areas of URL parsing to see if it could benefit from knowing if the input contains only ASCII characters. Most other places have stricter rules (like lowercasing), so it is unlikely we would see wins so extreme.
 

Sign in to add a comment