Skip to content

test(pm): cover resolver mainloop and remove preload#3068

Closed
elrrrrrrr wants to merge 2 commits into
perf/pm-review-resolver-demand-mainloopfrom
perf/pm-review-resolver-mainloop-cleanup
Closed

test(pm): cover resolver mainloop and remove preload#3068
elrrrrrrr wants to merge 2 commits into
perf/pm-review-resolver-demand-mainloopfrom
perf/pm-review-resolver-mainloop-cleanup

Conversation

@elrrrrrrr
Copy link
Copy Markdown
Contributor

Summary

  • Add demand mainloop unit coverage.
  • Remove obsolete resolver preload events/module.

Review Focus

  • Mainloop invariants and preload API removal impact.

@elrrrrrrr elrrrrrrr added A-Pkg Manager Area: Package Manager benchmark Run pm-bench on PR labels May 25, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes the preload module and its associated build events, streamlining the dependency resolution process. It introduces significant test coverage in builder.rs for manifest state handling, fetch queue prioritization, and concurrency limits. The reviewer noted that the CountingRegistry mock implementation in the tests is missing the #[async_trait::async_trait] attribute on the RegistryClient trait implementation, which is necessary for consistency with other async traits in the module.

shared_version_jobs: Arc<AtomicUsize>,
}

impl crate::traits::registry::RegistryClient for CountingRegistry {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The implementation of RegistryClient for CountingRegistry is missing the #[async_trait::async_trait] attribute. Since the ManifestProvider implementation for the same struct (line 1954) uses it, and the methods are async, this attribute is likely required for the trait to be correctly implemented and to maintain consistency with other async trait implementations in this module.

    #[async_trait::async_trait]
    impl crate::traits::registry::RegistryClient for CountingRegistry {

@elrrrrrrr elrrrrrrr force-pushed the perf/pm-review-resolver-demand-mainloop branch from 20f3f4a to 39a248b Compare May 25, 2026 09:49
@elrrrrrrr elrrrrrrr force-pushed the perf/pm-review-resolver-mainloop-cleanup branch from a4df082 to 275de3c Compare May 25, 2026 09:49
@github-actions
Copy link
Copy Markdown

📊 pm-bench-phases · afb9163 · linux (ubuntu-latest)

Workflow run — ant-design

PMs: utoo (this branch) · utoo-npm (latest published) · bun (latest)

npmjs.org

p0_full_cold

PM wall ±σ user sys RSS pgMinor
bun 9.37s 0.18s 10.54s 10.51s 591M 303.2K
utoo-next 8.78s 0.62s 10.61s 12.61s 977M 129.6K
utoo-npm 8.47s 0.06s 10.78s 12.71s 981M 130.5K
utoo 8.39s 0.19s 11.46s 12.69s 1003M 158.2K
PM vCtx iCtx netRX netTX cache node_mod lock
bun 19.0K 18.0K 1.22G 7M 1.93G 1.81G 1M
utoo-next 122.8K 88.0K 1.19G 5M 1.77G 1.77G 2M
utoo-npm 129.4K 95.1K 1.19G 5M 1.77G 1.77G 2M
utoo 111.5K 71.5K 1.19G 6M 1.77G 1.76G 2M

p1_resolve

PM wall ±σ user sys RSS pgMinor
bun 2.54s 0.06s 3.98s 1.16s 489M 192.1K
utoo-next 3.29s 0.08s 5.48s 1.86s 613M 84.0K
utoo-npm 3.43s 0.01s 5.71s 2.25s 619M 86.0K
utoo 2.64s 0.07s 6.04s 1.80s 657M 123.4K
PM vCtx iCtx netRX netTX cache node_mod lock
bun 13.7K 3.4K 204M 3M 109M - 1M
utoo-next 55.7K 75.0K 202M 3M 7M 3M 2M
utoo-npm 81.9K 101.0K 203M 3M 7M 3M 2M
utoo 17.4K 21.4K 205M 3M 7M 3M 2M

p3_cold_install

PM wall ±σ user sys RSS pgMinor
bun 6.92s 0.14s 6.56s 10.42s 572M 208.1K
utoo-next 7.18s 1.29s 5.16s 11.09s 497M 65.0K
utoo-npm 6.52s 0.27s 5.17s 10.98s 489M 64.7K
utoo 7.03s 0.93s 5.14s 11.18s 495M 66.1K
PM vCtx iCtx netRX netTX cache node_mod lock
bun 8.5K 8.7K 1.02G 5M 1.82G 1.82G 1M
utoo-next 103.8K 49.9K 1017M 3M 1.76G 1.76G 3M
utoo-npm 97.6K 49.2K 1017M 2M 1.76G 1.76G 3M
utoo 111.0K 54.0K 1017M 3M 1.76G 1.76G 3M

p4_warm_link

PM wall ±σ user sys RSS pgMinor
bun 3.38s 0.09s 0.23s 2.36s 136M 32.3K
utoo-next 2.58s 0.41s 0.50s 3.90s 81M 18.9K
utoo-npm 2.34s 0.03s 0.51s 3.89s 81M 18.8K
utoo 2.24s 0.06s 0.51s 3.87s 81M 18.6K
PM vCtx iCtx netRX netTX cache node_mod lock
bun 427 22 5M 31K 1.98G 1.81G 1M
utoo-next 42.0K 17.8K 307K 12K 1.76G 1.76G 2M
utoo-npm 43.9K 20.6K 307K 28K 1.76G 1.76G 2M
utoo 42.7K 19.4K 309K 28K 1.77G 1.76G 2M

npmmirror.com: no output captured.

@elrrrrrrr
Copy link
Copy Markdown
Contributor Author

Superseded: re-splitting #3028 from scratch (mirroring the #3029 installer split into #3075/#3076). Closing this draft to avoid a stale parallel split stack.

@elrrrrrrr elrrrrrrr closed this May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Pkg Manager Area: Package Manager benchmark Run pm-bench on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant