Uh oh!
There was an error while loading. Please reload this page.
url: Improve url module performance #3 - #2303
Conversation
Fishrock123
commented
Aug 5, 2015
@STRML do you think you could re-add the whatwg tests ala https://github.com/nodejs/io.js/pull/1561/files#diff-5632d0587131eb38265a594bcc1bdf6dR2921? |
STRML
commented
Aug 5, 2015
@Fishrock123 That's doable, however the |
Fishrock123
commented
Aug 5, 2015
@STRML Could be, maybe see if the whatwg tests pass or not without the url improvements? |
STRML
commented
Aug 5, 2015
It appears that even without the overrides, a few are failing. Subtle things, like: or Without these changes (on So it appears the behavior has changed subtly since #1561 was written. |
Fishrock123
commented
Aug 5, 2015
@STRML right. The important thing is that it works like it did before applying the patches though, so that's the point we need to test from. :) |
STRML
commented
Aug 5, 2015
Yes. There are some differences. Should I enumerate them? |
Fishrock123
commented
Aug 5, 2015
@STRML Yes please. They may (probably) indicate differences we may need to fix. |
STRML
commented
Aug 5, 2015
Behavior changes from |
silverwind
commented
Aug 6, 2015
I think the best option here is to fix the remaining issues so all WHATWG tests pass (valueing spec conformity over speed) and then land this on the |
STRML
commented
Aug 6, 2015
Rebased on newest |
STRML
commented
Aug 6, 2015
Okay. If we're going for better compat with the WHATWG tests, I've gone through them. I'm just going to refer to them in the order they appear in the comment above:
|
domenic
commented
Aug 6, 2015
I don't think it's generally a good idea to be consulting Chrome without consulting a quorum of other browsers. Chrome has no special status here. |
STRML
commented
Aug 6, 2015
I'm just going from the published test results. I'll edit the comment and link to them. |
domenic
commented
Aug 6, 2015
Right. So, for example, for 2, the spec matches 2 browsers, whereas the behavior in this patch matches 1 (Chrome). That's the kind of clarity I think is important. |
STRML
commented
Sep 2, 2015
I've updated the table above to be more descriptive. Hopefully someone can take it from here. In summary, this parser is faster and more accurate than Node master but not perfect. In some tests, no browsers pass. |
silverwind
commented
Sep 5, 2015
Some breakage will be unavoidable here, so I'll label this as major. |
STRML
commented
Sep 8, 2015
What needs to be done to get this in for v5? |
silverwind
commented
Sep 8, 2015
@STRML to recap, are the above 5 examples the only failing WHATWG tests? |
STRML
commented
Sep 8, 2015
The 6 listed are the ones that do not match the previous behavior. The If I can find a better dump of the tests and their expected values I'll update. |
silverwind
commented
Sep 8, 2015
I don't think matching previous behaviour should be a concern if we aim for a |
STRML
commented
Sep 8, 2015
That may take some work but I agree that this should be the goal. It appears, however, that there are no major implementations, anywhere, that pass all the tests. For reference, this appears to be the most up-to-date repository for the tests: https://github.com/w3c/web-platform-tests/tree/master/url Unfortunately the test data is in a non-standard format and needs to be parsed. Best this becomes a separate |
domenic
commented
Sep 8, 2015
https://github.com/jsdom/whatwg-url should pass |
6ba195d to
b6b57e8Compareb6b57e8 to
018659bCompareSTRML
commented
Feb 6, 2016
I've rebased this PR. There's one failing test I'm working on: Benches look good. I've run them for comparison with mscdex's PR (#4892) which is more conservative but easier to merge. |
STRML
commented
Feb 6, 2016
@fansworld-claudio I agree that as part of a semver-major change that bug should be fixed, but I'd rather not put it in this particular PR so that we have a better hope of merging it. |
STRML
commented
Feb 7, 2016
@rvagg Re: the reversion of these changes, is there still interest in getting it merged? |
STRML
commented
Feb 7, 2016
I'm working through the WHATWG tests. We're failing a lot of them. We're better on about 10 of them with this PR than we were before, what we're missing some major functionality (like backtracking on I believe this is mergeable as a major but after it does, we should concentrate on attempting to achieve as near to 100% WHATWG compatibility as possible. I've marked most of the failures (starting to get tired, there are very many) with links to the spec and expected results. All of our tests are passing in this PR. |
silverwind
commented
Feb 7, 2016
benjamingr
commented
Mar 23, 2016
Status @STRML? |
STRML
commented
Mar 23, 2016
benjamingr
commented
Mar 23, 2016
Still interested? |
silverwind
commented
Mar 23, 2016
Is it worth it? I think at this point, it'd be a pretty big rewrite. Are there still perf gains to be had? |
STRML
commented
Mar 23, 2016
Still significant performance benefits, and the new parser is more compliant with the WHATWG tests than the current ones. We have a chance with this overhaul to become much more standards, and to be nearly an order of magnitude faster as well. Unfortunately I have a lot of work on my plate right now so it may be some time before I'm able to rebase this. |
silverwind
commented
Mar 23, 2016
Alright, let's leave this open. |
7da4fd4 to
c7066fbComparec133999 to
83c7a88Comparejasnell
commented
Feb 28, 2017
Given the existence of the new WHATWG URL parser implmentation and the lack of forward progress on this, I'm closing. Can reopen if necessary. |
This is a rebase of #1650, which is a stripped version of #1561 that does not break any compat.
As @petkaantonovcommented he's short on time, so I went ahead and rebased the PR so it can be merged.
Thanks @petkaantonov for your hard work, hoping this can make it into iojs soon.