Skip to content

Switch time profiling to use lazy load stop and collect method by default - #305

Merged
IlyasShabi merged 1 commit into
mainfrom
ishabi/use-stop-and-collect
Mar 23, 2026
Merged

Switch time profiling to use lazy load stop and collect method by default#305
IlyasShabi merged 1 commit into
mainfrom
ishabi/use-stop-and-collect

Conversation

@IlyasShabi

Copy link
Copy Markdown

What does this PR do?:
Switch time profiling to use stopAndCollect instead of the legacy stop, and remove the old code path.

Motivation:
PR #287 showed (via CI benchmarks) that stopAndCollect cuts memory usage by ~52% for a significant profile size. This change makes using stop and collect as the default for time profiling.

@IlyasShabiIlyasShabi added the semver-patch Bug or security fixes, mainly label Mar 19, 2026
@github-actions

Copy link
Copy Markdown

Overall package size

Self size: 2.01 MB
Deduped: 2.37 MB
No deduping: 2.37 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | source-map | 0.7.6 | 185.63 kB | 185.63 kB | | pprof-format | 2.2.1 | 163.06 kB | 163.06 kB | | node-gyp-build | 3.9.0 | 8.81 kB | 8.81 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@pr-commenter

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-03-19 15:41:46

Comparing candidate commit b085254 in PR branch ishabi/use-stop-and-collect with baseline commit 2d2b6ea in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 92 metrics, 28 unstable metrics.

@IlyasShabi
IlyasShabi marked this pull request as ready for review March 23, 2026 10:28

@szegediszegedi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚢

@IlyasShabi
IlyasShabi merged commit 85f2457 into mainMar 23, 2026
69 checks passed
@IlyasShabi
IlyasShabi deleted the ishabi/use-stop-and-collect branch March 23, 2026 12:48
szegedi pushed a commit that referenced this pull request Mar 27, 2026
@szegediszegedi mentioned this pull request Mar 27, 2026
szegedi pushed a commit that referenced this pull request Mar 27, 2026
szegedi added a commit that referenced this pull request May 19, 2026
…#329)
* Revert "use stop and collect on time profiler (#305)"
This reverts commit 85f2457.
* Revert "Switch heap profiling to use lazy allocation profile method by default (#281)"
This reverts commit fb3d75d.
* Touchup for TS6 changes introduced after the reverted commits.
Specifically enforcing TS2883 under `composite: true`: any
function whose inferred return type names a non-imported
type must be annotated explicitly.
IlyasShabi pushed a commit that referenced this pull request May 19, 2026
…#329)
* Revert "use stop and collect on time profiler (#305)"
This reverts commit 85f2457.
* Revert "Switch heap profiling to use lazy allocation profile method by default (#281)"
This reverts commit fb3d75d.
* Touchup for TS6 changes introduced after the reverted commits.
Specifically enforcing TS2883 under `composite: true`: any
function whose inferred return type names a non-imported
type must be annotated explicitly.
IlyasShabi added a commit that referenced this pull request May 19, 2026
* use trusted publishing for dev releases (#310)
* use trusted publishing for dev releases
* use release publisher file to release dev tag too (#311)
use release publisher file to release dev tag
* chore(deps): minor: sinon · patch: @types/node, @types/sinon (#317)
Co-authored-by: gh-worker-campaigns-3e9aa4[bot] <244854796+gh-worker-campaigns-3e9aa4[bot]@users.noreply.github.com>
* build(deps-dev): bump typescript from 5.9.3 to 6.0.3 (#315)
* build(deps-dev): bump typescript from 5.9.3 to 6.0.3
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 6.0.3.
- [Commits](microsoft/TypeScript@v5.9.3...v6.0.3)
---
updated-dependencies:
- dependency-name: typescript
dependency-version: 6.0.3
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
* fix(ts): explicit types in tsconfig and bump @types/node to 25.6.0
TypeScript 6.0 no longer auto-loads @types/* by default with this
project's tsconfig setup, so Node and Mocha globals (Buffer, process,
__dirname, describe, it, ...) became unresolved. Pin "types" to
["node", "mocha"] so the compiler picks them up explicitly.
Also bumps @types/node from 25.5.2 to 25.6.0, superseding #314.
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Attila Szegedi <attila.szegedi@datadoghq.com>
* chore(deps): node-gyp-build (major → 4.8.4) (#316)
Co-authored-by: gh-worker-campaigns-3e9aa4[bot] <244854796+gh-worker-campaigns-3e9aa4[bot]@users.noreply.github.com>
* build(deps-dev): bump @types/node from 25.6.0 to 25.7.0 (#324)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.6.0 to 25.7.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
---
updated-dependencies:
- dependency-name: "@types/node"
dependency-version: 25.7.0
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump eslint-plugin-n from 17.24.0 to 18.0.1 (#320)
Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 17.24.0 to 18.0.1.
- [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases)
- [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md)
- [Commits](eslint-community/eslint-plugin-n@v17.24.0...v18.0.1)
---
updated-dependencies:
- dependency-name: eslint-plugin-n
dependency-version: 18.0.1
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump node-gyp-build from 3.9.0 to 4.8.4 (#284)
Bumps [node-gyp-build](https://github.com/prebuild/node-gyp-build) from 3.9.0 to 4.8.4.
- [Commits](prebuild/node-gyp-build@v3.9.0...v4.8.4)
---
updated-dependencies:
- dependency-name: node-gyp-build
dependency-version: 4.8.4
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Attila Szegedi <szegedi@users.noreply.github.com>
* build(deps-dev): bump semver from 7.7.4 to 7.8.0 (#323)
Bumps [semver](https://github.com/npm/node-semver) from 7.7.4 to 7.8.0.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.7.4...v7.8.0)
---
updated-dependencies:
- dependency-name: semver
dependency-version: 7.8.0
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump sinon from 21.1.2 to 22.0.0 (#325)
Bumps [sinon](https://github.com/sinonjs/sinon) from 21.1.2 to 22.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](sinonjs/sinon@v21.1.2...v22.0.0)
---
updated-dependencies:
- dependency-name: sinon
dependency-version: 22.0.0
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add Node.js v25 to benchmarks (#326)
* support Node.js v26 (#327)
* support Node.js v26
* Revert lazy profile-tree changes to mitigate CpuProfile::Delete crash (#329)
* Revert "use stop and collect on time profiler (#305)"
This reverts commit 85f2457.
* Revert "Switch heap profiling to use lazy allocation profile method by default (#281)"
This reverts commit fb3d75d.
* Touchup for TS6 changes introduced after the reverted commits.
Specifically enforcing TS2883 under `composite: true`: any
function whose inferred return type names a non-imported
type must be annotated explicitly.
* v14.5.2
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: gh-worker-campaigns-3e9aa4[bot] <244854796+gh-worker-campaigns-3e9aa4[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Attila Szegedi <attila.szegedi@datadoghq.com>
Co-authored-by: Attila Szegedi <szegedi@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-patchBug or security fixes, mainly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@IlyasShabi@szegedi