Skip to content

[js_runtime, corelib] Use URLSearchParams for computing Uri.query string. #53775

Open
@rakudrama

Description

@rakudrama

Customer experiments show that it is considerably (>10x) faster to use the browser's URLSearchParams to compute the query string from the queryParameters map when the map contains large values that require some escaping (e.g. 500K of JSON).

Uri should be slightly refactored to allow the platform libraries to implement the entire parameter string generation.
The web implementation would use URLSearchParams is it is available.
Some care will be needed to verify that the escaping matches exactly and the error handling (e.g. singleton surrogates) is the same.

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.dart2js-runtime-libraryIssues related to runtime library for dart2js (sdk/lib/_internal/js_runtime)web-dart2jsweb-platform

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions