Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

policy: minor perf opts and cleanup #29322

Closed
wants to merge 1 commit into from
Closed

Conversation

bmeck
Copy link
Member

@bmeck bmeck commented Aug 26, 2019

Cleanup: Use more Maps instead of object dictionaries, use private fields instead of WeakMaps, minor error message cleanup.

Perf: Makes redirects lazier for parsing which was proving to be a large amount of work for relative URL strings and adds a parse cache.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Aug 26, 2019
@nodejs-github-bot
Copy link
Collaborator

Trott
Trott previously requested changes Aug 29, 2019
Copy link
Member

@Trott Trott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple test-policy-* failures on all platforms in CI. Marking with "Request changes" so no one accidentally lands it until those are fixed. Feel free to dismiss this request-for-changes once the tests are passing.

@@ -34,10 +34,10 @@ const parse = (str) => {
const entries = [];
while (match = RegExpPrototype.exec(kSRIPattern, str)) {
if (match.index !== prevIndex) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be one whole condition with below ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be yea, i think readability is better as is but if requested to change I could

@nodejs-github-bot
Copy link
Collaborator

@Trott Trott dismissed their stale review August 31, 2019 01:26

tests are passing now

bmeck added a commit that referenced this pull request Sep 3, 2019
PR-URL: #29322
Reviewed-By: James M Snell <jasnell@gmail.com>
@bmeck
Copy link
Member Author

bmeck commented Sep 3, 2019

Landed in 6ce87c0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants