Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1400)

Issue 30013574: Issue 7296 - Implement lightweight URL parsing (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 months, 4 weeks ago by Manish Jethani
Modified:
4 months, 3 weeks ago
Reviewers:
hub
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

To test the performance: (function() { "use strict"; let {parseURL} = require("./lib/url"); let startTime = Date.now(); for (let i = 0; i < 10000000; i++) //new URL("https://example.com/foo/?bar=1#lambda"); parseURL("https://example.com/foo/?bar=1#lambda"); console.log(Date.now() - startTime); })(); This at least 10x as fast and even 25x or more for longer URLs.

Patch Set 1 #

Patch Set 2 : Add toString() #

Patch Set 3 : Add tests for IPv6 #

Patch Set 4 : Add more tests #

Total comments: 2

Patch Set 5 : Make protocol field required #

Patch Set 6 : Remove non-normalized URLs from tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+305 lines, -1 line) Patch
M lib/url.js View 1 2 3 4 1 chunk +78 lines, -0 lines 0 comments Download
M test/url.js View 1 2 3 4 5 1 chunk +227 lines, -1 line 0 comments Download

Messages

Total messages: 8
Manish Jethani
4 months, 4 weeks ago (2019-02-21 11:20:33 UTC) #1
Manish Jethani
Patch Set 1 This is a lightweight version of the URL object. I still need ...
4 months, 4 weeks ago (2019-02-21 11:24:37 UTC) #2
Manish Jethani
Patch Sets 2-4 The only question I have in my mind is whether the URL ...
4 months, 4 weeks ago (2019-02-21 15:29:17 UTC) #3
hub
https://codereview.adblockplus.org/30013574/diff/30013591/lib/url.js File lib/url.js (right): https://codereview.adblockplus.org/30013574/diff/30013591/lib/url.js#newcode115 lib/url.js:115: return match ? new URLInfo(url, match[1], match[2]) : new ...
4 months, 4 weeks ago (2019-02-21 16:24:08 UTC) #4
Manish Jethani
Patch Set 5: Make protocol field required https://codereview.adblockplus.org/30013574/diff/30013591/lib/url.js File lib/url.js (right): https://codereview.adblockplus.org/30013574/diff/30013591/lib/url.js#newcode115 lib/url.js:115: return match ...
4 months, 3 weeks ago (2019-02-23 07:32:06 UTC) #5
Manish Jethani
On 2019/02/21 15:29:17, Manish Jethani wrote: > The only question I have in my mind ...
4 months, 3 weeks ago (2019-02-23 08:11:06 UTC) #6
Manish Jethani
Patch Set 6: Remove non-normalized URLs from tests
4 months, 3 weeks ago (2019-02-23 08:27:29 UTC) #7
hub
4 months, 3 weeks ago (2019-02-25 20:01:17 UTC) #8
LGTM
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 87257f5