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

Only handle a create of the project root on Parcel startup #6644

Open
wants to merge 9 commits into
base: v2
Choose a base branch
from

Conversation

gorakong
Copy link
Member

@gorakong gorakong commented Jul 26, 2021

This constrains re-running of all requests in the RequestTracker to the initial build. Will be landed alongside parcel-bundler/watcher#57 to fix infinite build looping on the dev server caused by unknown flags triggering create events.

Test Plan

  • Manual testing in a large app confirms that builds in watch mode are no longer looping.
  • Existing integration test 'should support moving the project root' passes

@height
Copy link

height bot commented Jul 26, 2021

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@parcel-benchmark
Copy link

parcel-benchmark commented Jul 26, 2021

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 1.42s -45.00ms
Cached 330.00ms 22.00ms ⚠️

Cold Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb 0.00b 84.00ms -22.00ms 🚀
dist/legacy/parcel.7cdb0fad.webp 102.94kb 0.00b 84.00ms -23.00ms 🚀
dist/modern/parcel.7cdb0fad.webp 102.94kb 0.00b 85.00ms -21.00ms 🚀
dist/legacy/index.2c76ad23.js 1.66kb 0.00b 392.00ms -47.00ms 🚀
dist/legacy/index.8aaa89c9.js 1.20kb 0.00b 392.00ms -47.00ms 🚀
dist/modern/index.6be20f01.js 1.13kb 0.00b 392.00ms -47.00ms 🚀
dist/legacy/index.html 826.00b 0.00b 496.00ms -34.00ms 🚀
dist/modern/index.html 749.00b 0.00b 495.00ms -35.00ms 🚀
dist/legacy/index.b8ae99ba.css 94.00b 0.00b 248.00ms -24.00ms 🚀
dist/modern/index.31cedca9.css 94.00b 0.00b 248.00ms -24.00ms 🚀

Cached Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb 0.00b 238.00ms 156.00ms ⚠️
dist/legacy/parcel.7cdb0fad.webp 102.94kb 0.00b 239.00ms 156.00ms ⚠️
dist/modern/parcel.7cdb0fad.webp 102.94kb 0.00b 239.00ms 156.00ms ⚠️

React HackerNews ✅

Timings

Description Time Difference
Cold 9.30s -79.00ms
Cached 416.00ms -36.00ms 🚀

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 1.64m -801.00ms
Cached 2.15s -149.00ms 🚀

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Three.js ✅

Timings

Description Time Difference
Cold 6.75s 37.00ms
Cached 268.00ms 18.00ms ⚠️

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Click here to view a detailed benchmark overview.

Copy link
Contributor

@wbinnssmith wbinnssmith left a comment

Choose a reason for hiding this comment

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

This should occur for one-off builds (i.e. not watch mode) as well. And it should occur in watch mode on the inital build only, not on the first set of fs changes (where it shouldn't happen at all). Probably should be around where we call getEventsSince?

cc @devongovett

packages/core/core/src/RequestTracker.js Outdated Show resolved Hide resolved
packages/core/core/src/Parcel.js Outdated Show resolved Hide resolved
@gorakong gorakong force-pushed the gkong/build-loop branch 3 times, most recently from e8fb742 to 0f0151c Compare July 27, 2021 18:18
@wbinnssmith
Copy link
Contributor

lgtm. cc @devongovett

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants