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

Resolve realpath in default resolver #5508

Merged
merged 27 commits into from
Jan 2, 2021
Merged

Resolve realpath in default resolver #5508

merged 27 commits into from
Jan 2, 2021

Conversation

devongovett
Copy link
Member

Closes #5183. Depends on #5481.

This is based on #5183 but with a slightly different strategy that matches Node behavior: we take the realpath at the very end rather than only of the module directory. This also allows files to be symlinks. I also added some tests for this.

Also removed the unnecessary realpath calls in other places around parcel now that asset file paths are never symlinks.

dishuostec and others added 26 commits July 27, 2020 16:18
… into realpath

# Conflicts:
#	packages/utils/node-resolver-core/src/NodeResolver.js
@height
Copy link

height bot commented Dec 20, 2020

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.

This was referenced Dec 20, 2020
@parcel-benchmark
Copy link

parcel-benchmark commented Dec 20, 2020

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 4.65s +160.00ms
Cached 795.00ms -54.00ms 🚀

Cold Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.d5807e82.webp 102.94kb +0.00b 45.00ms -9.00ms 🚀
dist/legacy/index.7e103b24.js 1.07kb +0.00b 1.55s -79.00ms 🚀
dist/legacy/index.html 701.00b +0.00b 1.55s -80.00ms 🚀
dist/legacy/index.507458dd.css 77.00b +0.00b 1.55s -80.00ms 🚀

Cached Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.d5807e82.webp 102.94kb +0.00b 81.00ms -10.00ms 🚀
dist/modern/parcel.d5807e82.webp 102.94kb +0.00b 57.00ms -3.00ms 🚀
dist/legacy/index.7e103b24.js 1.07kb +0.00b 82.00ms -20.00ms 🚀
dist/modern/index.97edf045.js 1.07kb +0.00b 88.00ms -8.00ms 🚀
dist/legacy/index.html 701.00b +0.00b 82.00ms -18.00ms 🚀
dist/modern/index.html 701.00b +0.00b 82.00ms -9.00ms 🚀
dist/legacy/index.507458dd.css 77.00b +0.00b 82.00ms -17.00ms 🚀
dist/modern/index.8ca944bc.css 77.00b +0.00b 82.00ms -9.00ms 🚀

React HackerNews ✅

Timings

Description Time Difference
Cold 24.18s -1.19s
Cached 15.43s +392.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/NotFound.5d9b792b.js 532.00b +0.00b 323.00ms -78.00ms 🚀
dist/logo.24c8bf9e.png 274.00b +0.00b 87.00ms +18.00ms ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/index.js 479.93kb +0.00b 74.00ms -4.00ms 🚀
dist/PermalinkedComment.62e59ad1.js 4.22kb +0.00b 73.00ms -5.00ms 🚀
dist/UserProfile.7223b396.js 1.70kb +0.00b 73.00ms -5.00ms 🚀
dist/NotFound.5d9b792b.js 532.00b +0.00b 45.00ms -29.00ms 🚀
dist/logo.24c8bf9e.png 274.00b +0.00b 45.00ms -14.00ms 🚀

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 2.22m +1.71s
Cached 3.14s -226.00ms 🚀

Cold Bundles

Bundle Size Difference Time Difference
dist/media-viewer.a564b877.js 72.71kb +0.00b 1.32m +1.09m ⚠️
dist/card.ac091eac.js 53.76kb +0.00b 13.81s -1.04m 🚀
dist/esm.d4fe111d.js 27.71kb +0.00b 12.82s +855.00ms ⚠️
dist/DatePicker.27ec5589.js 21.16kb +0.00b 9.61s -2.22s 🚀
dist/dropzone.27b639af.js 16.03kb +0.00b 49.67s +22.20s ⚠️
dist/workerHasher.8a9cd633.js 11.90kb +0.00b 10.26s +921.00ms ⚠️
dist/component.adc3ddbc.js 6.27kb +0.00b 6.25s +732.00ms ⚠️
dist/EmojiPickerComponent.f4a014bd.js 3.68kb +0.00b 10.30s +902.00ms ⚠️
dist/dropzone.ab62bdb4.js 3.44kb +0.00b 18.93s +2.40s ⚠️
dist/Modal.99a80838.js 3.15kb +0.00b 4.56s +837.00ms ⚠️
dist/16.2daaa966.js 1.86kb +0.00b 6.05s -1.26s 🚀
dist/16.72628d37.js 1.79kb +0.00b 6.29s +493.00ms ⚠️
dist/workerHasher.6aa37edc.js 1.75kb +0.00b 10.24s +917.00ms ⚠️
dist/list-number.d6f09d2f.js 1.68kb +0.00b 7.43s +1.06s ⚠️
dist/link.18257706.js 1.53kb +0.00b 7.43s +1.06s ⚠️
dist/16.f683480d.js 1.46kb +0.00b 6.25s +732.00ms ⚠️
dist/16.493f9d2a.js 1.36kb +0.00b 6.05s -1.26s 🚀
dist/layout.6fc445d4.js 1.27kb +0.00b 7.43s +1.06s ⚠️
dist/16.350f9e86.js 1.27kb +0.00b 6.05s -1.26s 🚀
dist/16.540cfafc.js 1.26kb +0.00b 6.25s +732.00ms ⚠️
dist/component.9c6ba2f0.js 1.23kb +0.00b 4.56s +836.00ms ⚠️
dist/action.b6fa0d15.js 1.23kb +0.00b 6.19s -1.15s 🚀
dist/16.76d22cc2.js 1.23kb +0.00b 4.56s +836.00ms ⚠️
dist/list.fc45edf6.js 1.18kb +0.00b 7.47s +1.09s ⚠️
dist/media-picker-analytics-error-boundary.133a9728.js 1.05kb +0.00b 49.67s +22.20s ⚠️
dist/simpleHasher.4e275b4f.js 755.00b +0.00b 10.24s +917.00ms ⚠️
dist/index.html 119.00b +0.00b 4.63s +867.00ms ⚠️

Cached Bundles

Bundle Size Difference Time Difference
dist/index.bba0c85d.js 2.31mb +0.00b 575.00ms -100.00ms 🚀
dist/pdfRenderer.50b8173f.js 1.11mb +0.00b 650.00ms -106.00ms 🚀
dist/editorView.267a5df1.js 587.39kb +0.00b 686.00ms -89.00ms 🚀
dist/popup.16662854.js 169.21kb +0.00b 678.00ms -79.00ms 🚀
dist/EmojiPickerComponent.4faa5472.js 139.08kb +0.00b 641.00ms -62.00ms 🚀
dist/Toolbar.cd51d763.js 99.13kb +0.00b 684.00ms -91.00ms 🚀
dist/media-viewer.0aa3923d.js 72.60kb +0.00b 650.00ms -96.00ms 🚀
dist/card.33239941.js 53.89kb +0.00b 641.00ms -104.00ms 🚀
dist/card.6faf41b0.js 51.65kb +0.00b 674.00ms -101.00ms 🚀
dist/Modal.f72d1800.js 38.79kb +0.00b 581.00ms +44.00ms ⚠️
dist/component.effe7aa0.js 30.87kb +0.00b 573.00ms +82.00ms ⚠️
dist/esm.d4fe111d.js 27.71kb +0.00b 643.00ms -60.00ms 🚀
dist/component.7d45f63d.js 22.40kb +0.00b 499.00ms -38.00ms 🚀
dist/DatePicker.7146e115.js 21.03kb +0.00b 641.00ms -62.00ms 🚀
dist/smartMediaEditor.dafbb08e.js 16.69kb +0.00b 686.00ms -89.00ms 🚀
dist/js.aaf5ecd1.js 16.55kb +0.00b 498.00ms -39.00ms 🚀
dist/dropzone.5f6315ed.js 15.96kb +0.00b 670.00ms -86.00ms 🚀
dist/ui.9353c8f7.js 14.11kb +0.00b 641.00ms -97.00ms 🚀
dist/workerHasher.8a9cd633.js 11.90kb +0.00b 643.00ms -95.00ms 🚀
dist/component.adc3ddbc.js 6.27kb +0.00b 499.00ms -55.00ms 🚀
dist/card.f50bfb7e.js 5.71kb +0.00b 650.00ms -96.00ms 🚀
dist/media-viewer.b1642a16.js 4.01kb +0.00b 651.00ms -106.00ms 🚀
dist/EmojiPickerComponent.acb2e5c6.js 3.56kb +0.00b 641.00ms -97.00ms 🚀
dist/png-chunks-extract.1a612bb6.js 3.55kb +0.00b 498.00ms -39.00ms 🚀
dist/index.c1492881.css 3.46kb +0.00b 690.00ms -91.00ms 🚀
dist/dropzone.ab62bdb4.js 3.44kb +0.00b 678.00ms -78.00ms 🚀
dist/Modal.99a80838.js 3.15kb +0.00b 482.00ms -193.00ms 🚀
dist/clipboard.d10471c4.js 2.97kb +0.00b 670.00ms -86.00ms 🚀
dist/ResourcedEmojiComponent.e6000ed9.js 2.15kb +0.00b 641.00ms -97.00ms 🚀
dist/card.ac215339.js 2.15kb +0.00b 678.00ms -79.00ms 🚀
dist/images.c69c067f.js 1.90kb +0.00b 586.00ms -40.00ms 🚀
dist/feedback.a4a4dbc3.js 1.86kb +0.00b 626.00ms -78.00ms 🚀
dist/16.2daaa966.js 1.86kb +0.00b 539.00ms -47.00ms 🚀
dist/browser.d4b2ac0a.js 1.82kb +0.00b 670.00ms -86.00ms 🚀
dist/16.72628d37.js 1.79kb +0.00b 524.00ms -30.00ms 🚀
dist/workerHasher.6aa37edc.js 1.75kb +0.00b 643.00ms -60.00ms 🚀
dist/workerHasher.f631e5e0.js 1.75kb +0.00b 686.00ms -89.00ms 🚀
dist/list-number.d6f09d2f.js 1.68kb +0.00b 595.00ms -38.00ms 🚀
dist/status.09dffefc.js 1.68kb +0.00b 622.00ms -48.00ms 🚀
dist/link.18257706.js 1.53kb +0.00b 595.00ms -31.00ms 🚀
dist/heading6.ee7c597d.js 1.53kb +0.00b 626.00ms -78.00ms 🚀
dist/heading3.5a833b7b.js 1.51kb +0.00b 622.00ms -81.00ms 🚀
dist/16.542d3ab7.js 1.51kb +0.00b 539.00ms -29.00ms 🚀
dist/16.f683480d.js 1.46kb +0.00b 524.00ms -30.00ms 🚀
dist/16.72d89b1f.js 1.46kb +0.00b 524.00ms -43.00ms 🚀
dist/emoji.a556f6a6.js 1.45kb +0.00b 586.00ms -40.00ms 🚀
dist/16.e7cb0586.js 1.44kb +0.00b 556.00ms -119.00ms 🚀
dist/16.388091fb.js 1.40kb +0.00b 556.00ms -31.00ms 🚀
dist/heading5.368d12b0.js 1.40kb +0.00b 626.00ms -78.00ms 🚀
dist/expand.abd57bf3.js 1.38kb +0.00b 626.00ms -77.00ms 🚀
dist/16.493f9d2a.js 1.36kb +0.00b 556.00ms -30.00ms 🚀
dist/heading2.de835502.js 1.33kb +0.00b 622.00ms -48.00ms 🚀
dist/16.0c3e9d9e.js 1.32kb +0.00b 556.00ms -30.00ms 🚀
dist/media-card-analytics-error-boundary.2fc3699c.js 1.30kb +0.00b 650.00ms -96.00ms 🚀
dist/mention.0381ad00.js 1.29kb +0.00b 599.00ms -34.00ms 🚀
dist/heading4.abd6ed5d.js 1.29kb +0.00b 622.00ms -81.00ms 🚀
dist/Modal.c5a75f57.js 1.28kb +0.00b 498.00ms -39.00ms 🚀
dist/layout.6fc445d4.js 1.27kb +0.00b 586.00ms -40.00ms 🚀
dist/16.350f9e86.js 1.27kb +0.00b 539.00ms -29.00ms 🚀
dist/16.d2bd05f5.js 1.26kb +0.00b 524.00ms -30.00ms 🚀
dist/16.0c59612d.js 1.26kb +0.00b 539.00ms -29.00ms 🚀
dist/16.0a326f87.js 1.26kb +0.00b 539.00ms -29.00ms 🚀
dist/16.540cfafc.js 1.26kb +0.00b 524.00ms -30.00ms 🚀
dist/divider.2e530f7c.js 1.25kb +0.00b 586.00ms -40.00ms 🚀
dist/quote.df9cfef0.js 1.25kb +0.00b 617.00ms -53.00ms 🚀
dist/component.9c6ba2f0.js 1.23kb +0.00b 575.00ms -100.00ms 🚀
dist/16.76d22cc2.js 1.23kb +0.00b 574.00ms -101.00ms 🚀
dist/panel-warning.d1deb7d8.js 1.21kb +0.00b 617.00ms -42.00ms 🚀
dist/16.b4718b96.js 1.18kb +0.00b 556.00ms -31.00ms 🚀
dist/list.fc45edf6.js 1.18kb +0.00b 595.00ms -38.00ms 🚀
dist/heading1.cc39194f.js 1.18kb +0.00b 622.00ms -48.00ms 🚀
dist/panel-error.d22bf8a5.js 1.11kb +0.00b 599.00ms -34.00ms 🚀
dist/panel.b435337e.js 1.10kb +0.00b 617.00ms -42.00ms 🚀
dist/table.964f293b.js 1.09kb +0.00b 617.00ms -53.00ms 🚀
dist/media-picker-analytics-error-boundary.133a9728.js 1.05kb +0.00b 669.00ms -87.00ms 🚀
dist/panel-success.0b507c40.js 1.05kb +0.00b 617.00ms -42.00ms 🚀
dist/media-card-analytics-error-boundary.64bc429c.js 1.05kb +0.00b 677.00ms -69.00ms 🚀
dist/media-card-analytics-error-boundary.e9c7a84a.js 1.05kb +0.00b 686.00ms -89.00ms 🚀
dist/panel-note.07086709.js 1.05kb +0.00b 599.00ms -34.00ms 🚀
dist/media-viewer-analytics-error-boundary.c9f83b12.js 995.00b +0.00b 678.00ms -79.00ms 🚀
dist/simpleHasher.4e275b4f.js 755.00b +0.00b 643.00ms -95.00ms 🚀
dist/simpleHasher.a8bd8fa2.js 755.00b +0.00b 686.00ms -89.00ms 🚀
dist/index.html 119.00b +0.00b 484.00ms -98.00ms 🚀

Three.js ✅

Timings

Description Time Difference
Cold 17.16s -391.00ms
Cached 781.00ms +20.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

Bundle Size Difference Time Difference
dist/Three.js 580.68kb +0.00b 117.00ms +11.00ms ⚠️

Click here to view a detailed benchmark overview.

@devongovett devongovett merged commit 4035983 into fs-search Jan 2, 2021
@devongovett devongovett deleted the realpath branch January 2, 2021 00:59
@aminya
Copy link
Contributor

aminya commented Jan 2, 2021

Great to see this merged.

Can we revive this PR too?
#4920

@devongovett devongovett restored the realpath branch January 2, 2021 03:41
@devongovett devongovett deleted the realpath branch January 2, 2021 03:43
@danieltroger
Copy link
Contributor

Thank you soooo much for finally doing and merging this 🤗❤️

A ginormous pain in the ass is now gone. I just have to update everything to parcel 2 nightly and no longer care about how I import my dependencies :)

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.

7 participants