Skip to content

Conversation

@victorperin
Copy link
Contributor

@victorperin victorperin commented Apr 26, 2021

🚧 🚧 🚧 Work In Progress 🚧 🚧 🚧

Please fill in this template.

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an npm package, match the name. If not, do not conflict with the name of an npm package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • Represents shape of module/library correctly
  • tslint.json should contain { "extends": "dtslint/dt.json" }, and no additional rules.
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.

If removing a declaration:

  • If a package was never on Definitely Typed, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

@victorperin victorperin mentioned this pull request Apr 26, 2021
8 tasks
@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

Comparison details 📊
master #52594 diff
Batch compilation
Memory usage (MiB) 131.2 130.4 -0.6%
Type count 26341 26347 0%
Assignability cache size 9307 9307 0%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 868.7 862.2 -0.7%
    Mean CV 9.7% 8.7%
    Worst duration (ms) 1073.3 1063.4 -0.9%
    Worst identifier a a
getQuickInfoAtPosition
    Mean duration (ms) 855.0 862.7 +0.9%
    Mean CV 9.6% 9.4%
    Worst duration (ms) 1021.4 1045.8 +2.4%
    Worst identifier a a

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Apr 26, 2021
@victorperin
Copy link
Contributor Author

victorperin commented Apr 26, 2021

Thanks @Mesteery :)
I think I'll still need to change the tests, with I'll do later today.

@Mesteery
Copy link

sorry, the true type is AsyncIterableIterator. (and don't forget to update tests)

@typescript-bot
Copy link
Contributor

Updated numbers for you here from 521148b.

Comparison details 📊
master #52594 diff
Batch compilation
Memory usage (MiB) 141.2 142.9 +1.2%
Type count 26341 26346 0%
Assignability cache size 9307 9307 0%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 766.2 922.1 +20.3% 🔸
    Mean CV 10.2% 10.2%
    Worst duration (ms) 870.2 1061.9 +22.0% 🔸
    Worst identifier a assert
getQuickInfoAtPosition
    Mean duration (ms) 756.9 910.3 +20.3% 🔸
    Mean CV 9.2% 9.2%
    Worst duration (ms) 947.5 1026.7 +8.4%
    Worst identifier a b
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.095 GHz 2.397 GHz
CPU model Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

Looks like there were a couple significant differences—take a look at mean duration for getting completions at a position, worst-case duration for getting completions at a position, and mean duration for getting quick info at a position to make sure everything looks ok.

@typescript-bot typescript-bot added Perf: Worse typescript-bot determined that this PR has a negative impact on compilation performance. and removed Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. labels Apr 26, 2021
@typescript-bot
Copy link
Contributor

Updated numbers for you here from ca40e38. Nice job, these numbers look better.

Comparison details 📊
master #52594 diff
Batch compilation
Memory usage (MiB) 140.4 141.0 +0.4%
Type count 26341 26351 0%
Assignability cache size 9307 9307 0%
Language service
Samples taken 46 46 0%
Identifiers in tests 46 46 0%
getCompletionsAtPosition
    Mean duration (ms) 770.3 669.1 -13.1%
    Mean CV 9.9% 10.1%
    Worst duration (ms) 912.7 794.6 -12.9%
    Worst identifier a a
getQuickInfoAtPosition
    Mean duration (ms) 756.5 654.4 -13.5%
    Mean CV 9.9% 9.5%
    Worst duration (ms) 947.9 792.3 -16.4%
    Worst identifier a a
System information
Node version v14.16.1 v14.16.1
CPU count 2 2
CPU speed 2.095 GHz 2.593 GHz
CPU model Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
CPU Architecture x64 x64
Memory 6.8 GiB 6.8 GiB
Platform linux linux
Release 4.15.0-1113-azure 4.15.0-1113-azure

First off, note that the system varied slightly between these two runs, so you’ll have to take these measurements with a grain of salt.

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. and removed Perf: Worse typescript-bot determined that this PR has a negative impact on compilation performance. labels Apr 27, 2021
@gperdomor
Copy link

@victorperin thanks for your work, i hope this can be merged soon :D

@ExE-Boss
Copy link
Contributor

Since Node v16 supports the node: prefix in both ESM and CommonJS, #51107 should be re‑introduced (by reverting #52595 in v16)

@SimonSchick
Copy link
Contributor

I have a series of PRs out which should probably be merged first, otherwise this could get pretty annoying updating v15 and 16.

@karlhorky
Copy link
Contributor

@SimonSchick Which PRs are in this series? I guess these will all be done in a week or two?

@SimonSchick
Copy link
Contributor

#52732 #52775 and #52776 and one more PR that is not out yet.

I hope to have 15.6 in end of week, unfortunately 15.3 took a significant amount of time (16 days) to be approved so I'd assume the entire will take at least until the end of the month.

@karlhorky
Copy link
Contributor

@SimonSchick looks like the node: scheme / prefix was backported to Node.js 14.13.1 / 12.20.0 🎉

Maybe you could also do some new PRs for the v14 and v12 lines re-introducing the change by @ExE-Boss ?

Reference: https://nodejs.org/api/esm.html -> link "node: Imports" (links with anchors don't scroll properly right now)

Screen Shot 2021-05-30 at 11 04 39

@SimonSchick
Copy link
Contributor

My final v15 PR is probably going to land this week #53566
We can more actively work on this now, I think.

@SimonSchick
Copy link
Contributor

Please make sure to redo the file copying.

@SimonSchick
Copy link
Contributor

@victorperin, do you want to drive this PR or do you mind me to take over?

I realized I created a v16 branch a while ago (before I saw this PR), I think I could re-use some parts of this PR as well.

@victorperin
Copy link
Contributor Author

Oh, no problem, I'm currently under a ton of work latelly, i think you could end this faster than me. Thanks!

@SimonSchick SimonSchick mentioned this pull request Jun 9, 2021
8 tasks
@karlhorky
Copy link
Contributor

@types/node@16.0.0 has been published now - the node: schema / prefix now works again:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants