What can one do on Meteor 2.16?
Thanks for the profile!
Meteor uses a SQLite database to track the remote catalog of Atmosphere packages for offline usage. After running a profile with the official release (not a Git checkout as I normally use to work on), I saw that SQLite queries take a huge amount of time. Apparently having your projects running from a Meteor Git checkout this SQLite database is not queried the same way as part of dev mode, and it could make you save even more, you can check out with meteor profile
if you try out the approach.
There’s clearly room for improvement for published releases on managing this local database, and your profile, along with others I’ve taken locally, shows that. We’ll work on this for the next 3.3 beta.
For now, everyone can test the SWC delivery in the first 3.3-beta.0.
Update: Check this profile comparing running from a published release (3.3-beta.0) vs a meteor git check out (release-3.3 branch) with the same changes.
Rebuilds are similar. Builds are slower in published releases due to some SQLite DB queries running distinctly. In Meteor checkout, only prepareProjectForBuild
is slower the first time; after that, performance improves. We should look into this.
The profile system seems to work instantly and without issues that’s a great addition!
/usr/local/bin/meteor npm run start-profile
> start-profile
> meteor profile --exclude-archs web.browser.legacy,web.cordova --settings settings-development.json
===============================
Profile script
===============================
- App path: /xxxxxxxxxxxx
- App port: 3000
- Logs file: /xxxxxxxxxxxx/logs/1745058188191-xxxxx-bundle.log
===============================
===============================
Full log details at /xxxxxxxxxx/logs/1745058188191-xxxxx-bundle.log
===============================
* Profiling "Cold start"...
* Profiling "Cache start"...
* Profiling "Rebuild client"...
* Profiling "Rebuild server"...
===============================
Npm packages
===============================
📦️ Dependencies
┌─────────┬─────────────────────────────────────────────┬────────────────────────────────┬─────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ (index) │ 0 │ 1 │ 2 │ 3 │
├─────────┼─────────────────────────────────────────────┼────────────────────────────────┼─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 0 │ '@aws-sdk/client-s3@^3.363.0' │ '@aws-sdk/hash-node@^3.357.0' │ '@aws-sdk/protocol-http@^3.357.0' │ '@aws-sdk/s3-request-presigner@^3.363.0' │
│ 1 │ '@aws-sdk/signature-v4-crt@^3.425.0' │ '@aws-sdk/url-parser@^3.357.0' │ '@babel/runtime@^7.20.7' │ '@dnd-kit/core@^6.0.8' │
│ 2 │ '@dnd-kit/sortable@^7.0.2' │ '@editorjs/checklist@^1.6.0' │ '@editorjs/editorjs@^2.29.1' │ '@editorjs/header@^2.8.1' │
│ 3 │ '@editorjs/link@^2.6.2' │ '@editorjs/list@^1.9.0' │ '@editorjs/quote@^2.6.0' │ '@editorjs/raw@^2.5.0' │
│ 4 │ '@editorjs/simple-image@^1.6.0' │ '@faker-js/faker@^9.5.0' │ '@matterport/sdk@^1.4.24' │ '@print-one/moneybird-js@https://github.com/BLDBV/moneybird-js/releases/download/v1.9.4/moneybird-js.tar.gz' │
│ 5 │ '@types/geojson@^7946.0.12' │ '@types/leaflet@^1.9.3' │ '@types/mailparser@^3.4.5' │ '@types/meteor-mdg-validated-method@^1.2.10' │
│ 6 │ '@types/meteor-percolate-migrations@^1.0.0' │ 'adm-zip@^0.5.10' │ 'base64-stream@^1.0.0' │ 'bootstrap@^5.3.0' │
│ 7 │ 'bootstrap-icons@^1.10.5' │ 'date-fns@^3.0.0' │ 'date-fns-tz@^3.0.0' │ 'escape-string-regexp@^5.0.0' │
│ 8 │ 'express@^4.18.2' │ 'fabric@^5.3.0' │ 'fabricjs-react@^1.2.1' │ 'fast-xml-parser@^4.2.5' │
│ 9 │ 'frappe-gantt@^1.0.3' │ 'heic-convert@^2.1.0' │ 'http-proxy@^1.18.1' │ 'iconv-lite@^0.6.3' │
│ 10 │ 'image-thumbnail@^1.0.15' │ 'imap@^0.8.19' │ 'imapflow@^1.0.184' │ 'javascript-time-ago@^2.5.9' │
│ 11 │ 'json-rules-engine@^7.3.0' │ 'leaflet@^1.9.4' │ 'mailgun.js@^10.2.1' │ 'mailparser@^3.7.2' │
│ 12 │ 'meteor-node-stubs@^1.2.5' │ 'mime-types@^2.1.35' │ 'node-abort-controller@^3.1.1' │ 'node-imap@^0.9.6' │
│ 13 │ 'node-os-utils@^1.3.7' │ 'openweather-apis@^4.5.0' │ 'pdf-thumbnail@^0.0.1' │ 'pdfkit@^0.13.0' │
│ 14 │ 'pdfkit-table@^0.1.99' │ 'print-js@^1.6.0' │ 'prom-client@^15.0.0' │ 'pulltorefreshjs@^0.1.22' │
│ 15 │ 'qrcode@^1.5.3' │ 'react@^18.2.0' │ 'react-bootstrap@^2.7.4' │ 'react-calendar@^4.6.0' │
│ 16 │ 'react-dom@^18.2.0' │ 'react-draggable@^4.4.5' │ 'react-error-boundary@^4.0.13' │ 'react-helmet@^6.1.0' │
│ 17 │ 'react-hook-form@^7.45.4' │ 'react-leaflet@^4.2.1' │ 'react-pdf@^7.3.3' │ 'react-qr-scanner@^1.0.0-alpha.11' │
│ 18 │ 'react-router@^6.12.1' │ 'react-router-dom@^6.12.1' │ 'react-router-dom-last-location@^0.2.5' │ 'react-select@^5.8.0' │
│ 19 │ 'react-stars-screensaver@^1.1.0' │ 'react-xarrows@^2.0.2' │ 'react-zoom-pan-pinch@^3.3.0' │ 'really-relaxed-json@^0.3.2' │
│ 20 │ 'recharts@^2.15.0' │ 'showdown@^2.1.0' │ 'simpl-schema@^3.4.1' │ 'use-double-tap@^1.3.4' │
│ 21 │ 'use-long-press@^3.2.0' │ │ │ │
└─────────┴─────────────────────────────────────────────┴────────────────────────────────┴─────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
🛠️ DevDependencies
┌─────────┬──────────────────────────────────────────────────┬──────────────────────────────┬─────────────────────────────────────┬──────────────────────────────┐
│ (index) │ 0 │ 1 │ 2 │ 3 │
├─────────┼──────────────────────────────────────────────────┼──────────────────────────────┼─────────────────────────────────────┼──────────────────────────────┤
│ 0 │ '@babel/plugin-proposal-private-methods@^7.18.6' │ '@babel/preset-env@^7.22.9' │ '@quave/eslint-config-quave@^3.0.0' │ '@types/meteor@^2.9.4' │
│ 1 │ '@types/meteor-publish-composite@^0.0.39' │ '@types/mocha@^8.2.3' │ '@types/node@^18.13.0' │ '@types/react@^18.0.26' │
│ 2 │ '@types/react-dom@^18.0.10' │ '@types/react-helmet@^6.1.9' │ 'babel-loader@^8.3.0' │ 'cypress@^14.2.1' │
│ 3 │ 'eslint-plugin-react-hooks@^4.6.2' │ 'history@^5.3.0' │ 'mocha@^10.2.0' │ 'mongo-seeding@^3.7.2' │
│ 4 │ 'selenium-webdriver@^4.15.0' │ 'typescript@^4.9.4' │ 'webpack@^5.97.1' │ 'webpack-dev-server@^4.15.1' │
└─────────┴──────────────────────────────────────────────────┴──────────────────────────────┴─────────────────────────────────────┴──────────────────────────────┘
===============================
===============================
Meteor packages
===============================
☄️ Atmosphere
┌─────────┬────────────────────────────────────┬───────────────────────────────┬─────────────────────────────────┬────────────────────────────────────────┐
│ (index) │ 0 │ 1 │ 2 │ 3 │
├─────────┼────────────────────────────────────┼───────────────────────────────┼─────────────────────────────────┼────────────────────────────────────────┤
│ 0 │ 'accounts-base@3.1.0' │ 'accounts-password@3.1.0' │ 'alanning:roles@4.0.0' │ 'allow-deny@2.1.0' │
│ 1 │ 'autoupdate@2.0.0' │ 'babel-compiler@7.11.3' │ 'babel-runtime@1.5.2' │ 'base64@1.0.13' │
│ 2 │ 'binary-heap@1.0.12' │ 'boilerplate-generator@2.0.0' │ 'caching-compiler@2.0.1' │ 'callback-hook@1.6.0' │
│ 3 │ 'check@1.4.4' │ 'core-runtime@1.0.0' │ 'ddp@1.4.2' │ 'ddp-client@3.1.0' │
│ 4 │ 'ddp-common@1.4.4' │ 'ddp-rate-limiter@1.2.2' │ 'ddp-server@3.1.0' │ 'diff-sequence@1.1.3' │
│ 5 │ 'dynamic-import@0.7.4' │ 'ecmascript@0.16.10' │ 'ecmascript-runtime@0.8.3' │ 'ecmascript-runtime-client@0.12.3' │
│ 6 │ 'ecmascript-runtime-server@0.11.1' │ 'ejson@1.1.4' │ 'email@3.1.2' │ 'es5-shim@4.8.1' │
│ 7 │ 'facts-base@1.0.2' │ 'fetch@0.1.6' │ 'geojson-utils@1.0.12' │ 'hot-code-push@1.0.5' │
│ 8 │ 'hot-module-replacement@0.5.4' │ 'id-map@1.2.0' │ 'inter-process-messaging@0.1.2' │ 'launch-screen@2.0.1' │
│ 9 │ 'localstorage@1.2.1' │ 'logging@1.3.6' │ 'matb33:collection-hooks@2.0.0' │ 'mdg:validated-method@1.3.0' │
│ 10 │ 'meteor@2.1.0' │ 'meteor-base@1.5.2' │ 'minifier-css@2.0.1' │ 'minifier-js@3.0.1' │
│ 11 │ 'minimongo@2.0.2' │ 'mobile-experience@1.1.2' │ 'mobile-status-bar@1.1.1' │ 'modern-browsers@0.2.1' │
│ 12 │ 'modules@0.20.3' │ 'modules-runtime@0.13.2' │ 'modules-runtime-hot@0.14.3' │ 'mongo@2.1.1' │
│ 13 │ 'mongo-decimal@0.2.0' │ 'mongo-dev-server@1.1.1' │ 'mongo-id@1.0.9' │ 'montiapm:agent@3.0.0-beta.14' │
│ 14 │ 'montiapm:meteorx@2.3.1' │ 'npm-mongo@6.10.2' │ 'ordered-dict@1.2.0' │ 'percolate:migrations@2.0.0' │
│ 15 │ 'promise@1.0.0' │ 'random@1.2.2' │ 'rate-limit@1.1.2' │ 'react-fast-refresh@0.2.9' │
│ 16 │ 'react-meteor-data@3.0.3' │ 'reactive-var@1.0.13' │ 'reload@1.3.2' │ 'retry@1.1.1' │
│ 17 │ 'reywood:publish-composite@1.8.12' │ 'routepolicy@1.1.2' │ 'sha@1.0.10' │ 'shell-server@0.6.1' │
│ 18 │ 'socket-stream-client@0.6.0' │ 'standard-minifier-css@1.9.3' │ 'standard-minifier-js@3.0.0' │ 'static-html@1.4.0' │
│ 19 │ 'static-html-tools@1.0.0' │ 'tracker@1.3.4' │ 'typescript@5.6.3' │ 'underscore@1.6.4' │
│ 20 │ 'url@1.3.5' │ 'webapp@2.0.5' │ 'webapp-hashing@1.1.2' │ 'zodern:meteor-package-versions@0.2.2' │
│ 21 │ 'zodern:types@1.0.13' │ │ │ │
└─────────┴────────────────────────────────────┴───────────────────────────────┴─────────────────────────────────┴────────────────────────────────────────┘
===============================
===============================
Meteor version - METEOR@3.2
===============================
Meteor options - --exclude-archs web.browser.legacy,web.cordova --settings settings-development.json
===============================
===============================
Metrics - Cold start
===============================
- Meteor(resolveConstraints): 2401 ms
- Meteor(prepareProjectForBuild): 710 ms
- Meteor(Build App): 49411 ms
- Meteor(Server startup): 8189 ms
* Total(Meteor): 60711 ms
===============================
Metrics - Cache start
===============================
- Meteor(resolveConstraints): 600 ms
- Meteor(prepareProjectForBuild): 425 ms
- Meteor(Build App): 15837 ms
- Meteor(Server startup): 4681 ms
* Total(Meteor): 21543 ms
===============================
Metrics - Rebuild client
===============================
- Meteor(resolveConstraints): 506 ms
- Meteor(prepareProjectForBuild): 311 ms
- Meteor(Build App): 20044 ms
- Meteor(Server startup): 4640 ms
- Meteor(prepareProjectForBuild #1): 36 ms
- Meteor(Rebuild App #1): 4558 ms
- Meteor(prepareProjectForBuild #2): 29 ms
- Meteor(Rebuild App #2): 2590 ms
* Total(Meteor): 32714 ms
===============================
Metrics - Rebuild server
===============================
- Meteor(resolveConstraints): 560 ms
- Meteor(prepareProjectForBuild): 520 ms
- Meteor(Build App): 18587 ms
- Meteor(Server startup): 4943 ms
- Meteor(prepareProjectForBuild #1): 35 ms
- Meteor(Rebuild App #1): 4835 ms
- Meteor(Server startup #1): 5344 ms
- Meteor(prepareProjectForBuild #2): 31 ms
- Meteor(Rebuild App #2): 2796 ms
- Meteor(Server startup #2): 5066 ms
* Total(Meteor): 42717 ms
===============================
Full log details at /Users/xxxxxxxxx/logs/1745058188191-xxx-bundle.log
===============================
Process finished with exit code 0
This profile is ran locally on a recent MacBook Pro.
I think we use just default starting points:
"meteor": {
"mainModule": {
"client": "client/main.tsx",
"server": "server/main.ts"
},
"testModule": "tests/main.ts"
}
On ubuntu (also osX 15.4.1) I got this An error occurred when profiling
and in the last line of the logs it says.
.../node_modules/.cache/meteor/performance/scripts/monitor-bundler.sh: line 201: 71571 Killed METEOR_PROFILE="${METEOR_PROFILE:-1}}" METEOR_PACKAGE_DIRS="${METEOR_PACKAGE_DIRS}" ${meteorCmd} run ${meteorOptions}
Another issue is that the process says is got killed but in the console it keeps spinning
I think is timming out but I already added METEOR_IDLE_TIMEOUT=360 but still no luck.
I run profile on ubuntu without problems. What’s in line 201?
Mine is:
192 function waitMeteorApp() {
193 PROCESS_WAIT_TIMEOUT=3600000
194 processWaitTimeoutSecs=$((PROCESS_WAIT_TIMEOUT / 1000))
195 waitSecs=0
196 while ! isRunningUrl "http://localhost:${appPort}" && [[ "${waitSecs}" -lt "${processWaitTime>
197 sleep 1
198 waitSecs=$((waitSecs + 1))
199 done
200
201 echo ":: MeteorAppStarted"
202 }
Since it seems to finish the Cold and Cache phases and gets stuck on the rebuild client phase, the issue might be missing break lines at the end of your app’s entrypoint files.
Check your Meteor config in package.json
to see which files those are, and make sure they end with a break line. I haven’t fixed this yet. Hopefully, it’s just that, along with setting a higher timeout.
Adding an empty line didnt work, but creating the mock file on client did. Thanks. Here are the results.
metric | modernTranspiler | oldTranspiler | diff | diff % |
---|---|---|---|---|
Cold start | 36,674 | 62,855 | -26,181 | -41.7% |
Cache start | 20,873 | 24,619 | -3,746 | -15.2% |
Rebuild client | 26,413 | 29,562 | -3,149 | -10.7% |
Rebuild server | 30,825 | 34,667 | -3,842 | -11.1% |
Will it be possible to add the time to client refresh and to hmr? Probably not important if we are moving to vite.
Detailed logs
modernTranspiler: true
===============================
===============================
Meteor version - METEOR@3.3-beta.0
===============================
Meteor options - --settings=./.deploy/settings.dev.json
===============================
===============================
Metrics - Cold start
===============================
- Meteor(resolveConstraints): 2518 ms
- Meteor(prepareProjectForBuild): 515 ms
- Meteor(Build App): 31078 ms
- Meteor(Server startup): 2563 ms
* Total(Meteor): 36674 ms
===============================
Metrics - Cache start
===============================
- Meteor(resolveConstraints): 584 ms
- Meteor(prepareProjectForBuild): 449 ms
- Meteor(Build App): 17615 ms
- Meteor(Server startup): 2225 ms
* Total(Meteor): 20873 ms
===============================
Metrics - Rebuild client
===============================
- Meteor(resolveConstraints): 584 ms
- Meteor(prepareProjectForBuild): 442 ms
- Meteor(Build App): 17996 ms
- Meteor(Server startup): 2340 ms
- Meteor(prepareProjectForBuild #1): 42 ms
- Meteor(Rebuild App #1): 3016 ms
- Meteor(prepareProjectForBuild #2): 37 ms
- Meteor(Rebuild App #2): 1956 ms
* Total(Meteor): 26413 ms
===============================
Metrics - Rebuild server
===============================
- Meteor(resolveConstraints): 603 ms /
- Meteor(prepareProjectForBuild): 443 ms
- Meteor(Build App): 17969 ms
- Meteor(Server startup): 2228 ms
- Meteor(prepareProjectForBuild #1): 41 ms
- Meteor(Rebuild App #1): 2595 ms
- Meteor(Server startup #1): 2292 ms
- Meteor(prepareProjectForBuild #2): 33 ms
- Meteor(Rebuild App #2): 2354 ms
- Meteor(Server startup #2): 2267 ms
* Total(Meteor): 30825 ms
modernTranspiler: false
===============================
===============================
Meteor version - METEOR@3.3-beta.0
===============================
Meteor options - --settings=./.deploy/settings.dev.json
===============================
===============================
Metrics - Cold start
===============================
- Meteor(resolveConstraints): 2481 ms
- Meteor(prepareProjectForBuild): 504 ms
- Meteor(Build App): 57243 ms
- Meteor(Server startup): 2627 ms
* Total(Meteor): 62855 ms
===============================
Metrics - Cache start
===============================
- Meteor(resolveConstraints): 594 ms
- Meteor(prepareProjectForBuild): 457 ms
- Meteor(Build App): 21191 ms
- Meteor(Server startup): 2377 ms
* Total(Meteor): 24619 ms
===============================
Metrics - Rebuild client
===============================
- Meteor(resolveConstraints): 592 ms
- Meteor(prepareProjectForBuild): 451 ms
- Meteor(Build App): 20753 ms
- Meteor(Server startup): 2367 ms
- Meteor(prepareProjectForBuild #1): 40 ms
- Meteor(Rebuild App #1): 3170 ms
- Meteor(prepareProjectForBuild #2): 37 ms
- Meteor(Rebuild App #2): 2152 ms
* Total(Meteor): 29562 ms
===============================
Metrics - Rebuild server
===============================
- Meteor(resolveConstraints): 589 ms \
- Meteor(prepareProjectForBuild): 451 ms
- Meteor(Build App): 21301 ms
- Meteor(Server startup): 2336 ms
- Meteor(prepareProjectForBuild #1): 34 ms
- Meteor(Rebuild App #1): 2870 ms
- Meteor(Server startup #1): 2308 ms
- Meteor(prepareProjectForBuild #2): 32 ms
- Meteor(Rebuild App #2): 2437 ms
- Meteor(Server startup #2): 2309 ms
* Total(Meteor): 34667 ms
Ok so more info and more results.
When at home I use my desktop a ryzen 7 3800, 32gb ram and nvme ssd.
When on the go I use a macbook pro m4 with 48gb of shared memory.
I ran the profile in both machines with the same project and this are the results.
metric | ubuntu | osX | diff | diff % |
---|---|---|---|---|
Cold start | 36,674 | 18,385 | 18,289 | 99.5% |
Cache start | 20,873 | 10,412 | 10,461 | 100.5% |
Rebuild client | 26,413 | 11,380 | 15,033 | 132.1% |
Rebuild server | 30,825 | 13,949 | 16,876 | 121.0% |
I didnt expect the results will be so far appart between this 2 machines and os.
I will also add the comparison between old and modern transpiler on osX
metric | modern | old | diff | diff % |
---|---|---|---|---|
Cold start | 18,385 | 27,330.00 | -8,945 | -32.7% |
Cache start | 10,412 | 11,766.00 | -1,354 | -11.5% |
Rebuild client | 11,380 | 12,888.00 | -1,508 | -11.7% |
Rebuild server | 13,949 | 15,334.00 | -1,385 | -9.0% |
And here are the details
Old transpiler
Metrics - Cold start
- Meteor(resolveConstraints): 935 ms
- Meteor(prepareProjectForBuild): 242 ms
- Meteor(Build App): 24740 ms
- Meteor(Server startup): 1413 ms
- Total(Meteor): 27330 ms
===============================
Metrics - Cache start
===============================
- Meteor(resolveConstraints): 263 ms
- Meteor(prepareProjectForBuild): 216 ms
- Meteor(Build App): 10139 ms
- Meteor(Server startup): 1148 ms
- Total(Meteor): 11766 ms
===============================
Metrics - Rebuild client
===============================
- Meteor(resolveConstraints): 249 ms /
- Meteor(prepareProjectForBuild): 210 ms
- Meteor(Build App): 9544 ms
- Meteor(Server startup): 1064 ms
- Meteor(prepareProjectForBuild #1): 16 ms
- Meteor(Rebuild App #1): 1006 ms
- Meteor(prepareProjectForBuild #2): 16 ms
- Meteor(Rebuild App #2): 783 ms
- Total(Meteor): 12888 ms
===============================
Metrics - Rebuild server
===============================
- Meteor(resolveConstraints): 243 ms
- Meteor(prepareProjectForBuild): 211 ms
- Meteor(Build App): 9525 ms
- Meteor(Server startup): 1053 ms
- Meteor(prepareProjectForBuild #1): 16 ms
- Meteor(Rebuild App #1): 1227 ms
- Meteor(Server startup #1): 1027 ms
- Meteor(prepareProjectForBuild #2): 15 ms
- Meteor(Rebuild App #2): 1028 ms
- Meteor(Server startup #2): 989 ms
- Total(Meteor): 15334 ms
Modern transpiler
Metrics - Cold start
- Meteor(resolveConstraints): 943 ms
- Meteor(prepareProjectForBuild): 234 ms
- Meteor(Build App): 14841 ms
- Meteor(Server startup): 1444 ms
- Total(Meteor): 17462 ms
===============================
Metrics - Cache start
===============================
- Meteor(resolveConstraints): 267 ms
- Meteor(prepareProjectForBuild): 218 ms
- Meteor(Build App): 8911 ms
- Meteor(Server startup): 1095 ms
- Total(Meteor): 10491 ms
===============================
Metrics - Rebuild client
===============================
- Meteor(resolveConstraints): 257 ms
- Meteor(prepareProjectForBuild): 224 ms
- Meteor(Build App): 8376 ms
- Meteor(Server startup): 1055 ms
- Meteor(prepareProjectForBuild #1): 15 ms
- Meteor(Rebuild App #1): 860 ms
- Meteor(prepareProjectForBuild #2): 17 ms
- Meteor(Rebuild App #2): 708 ms
- Total(Meteor): 11512 ms -
===============================
Metrics - Rebuild server
===============================
- Meteor(resolveConstraints): 242 ms
- Meteor(prepareProjectForBuild): 212 ms
- Meteor(Build App): 8516 ms
- Meteor(Server startup): 1045 ms
- Meteor(prepareProjectForBuild #1): 17 ms
- Meteor(Rebuild App #1): 1057 ms
- Meteor(Server startup #1): 1029 ms
- Meteor(prepareProjectForBuild #2): 14 ms
- Meteor(Rebuild App #2): 971 ms
- Meteor(Server startup #2): 1020 ms
- Total(Meteor): 14123 ms
Will it be possible to add the time to client refresh and to hmr? Probably not important if we are moving to vite.
Yes, the time to refresh client and server is within the “Rebuild client” and “Rebuild server” phases. Specifically, the stages including #1 and #2, which correspond to the two file change that triggered rebuilds.
To clarify, I added new entries to the meteor profile
output: Total(Rebuild #1)
and Total(Rebuild #2)
. These sum up the prepareProjectForBuild
, Rebuild App
, and Server Startup
(only in server rebuild) stages for each run. This should give a clearer view of what’s relevant in that phase. To see the full rebuild metrics, use meteor reset
and run profiling again.
I enjoy seeing the profiles you share and the actual improvements in your projects. Meteor profiling has also been a quick way for each developer to check their own machines and, like you did, compare setups to see which one gives the best dev experience. Our time is valuable, and having a proper machine is a solid investment for daily work.
We’re planning a new set of changes that should lower those numbers even more.
To me, Meteor 3.3 is all about focusing on what Meteor really is, so we can support the bundler that builds our apps up to the point where we hit its limits.
Meteor 3.4 will push those numbers down further, as more of your app’s processes, like watching, transpiling, compiling, and minifying, will be delegated to a modern bundler. That lets Meteor concentrate on what matters: Atmosphere packages, the dev server, Mongo dev experience, and other specifics of the tool we love.
Ive seen the PR’s on github and it looks like it will get much better for speed in the next weeks.
Looking forward to test more of those improvements.
I’d love to test the refapp:meteor-typescript compiler too but it’s a bit complicated since, for unknown legacy reasons, a published compiler does NOT use dependencies from the meteor version you compile for but instead dependencies (e.g. BabelCompiler) that are published in the compiler package itself.
So to test, I would need to republish a new version of the compiler with meteor publish --release 3.3-beta0…
Will do that but not right now.
And I would love to understand why on earth isobuild published compilers don’t use dependencies from the meteor version it’s compiling for. I would guess this decision is lost in the annals of time…
I have new results from running profile with the new 3.3-beta.1. The project has changed since the last profile so I can only compare modern: true
with modern: false
.
osX profiling | |||
---|---|---|---|
metric | modern beta.1 | old | diff % |
Cold start | 20,830 | 32,782 | -36.5% |
Cache start | 12,183 | 14,163 | -14.0% |
Rebuild client | 13,810 | 16,391 | -15.7% |
Rebuild server | 17,581 | 20,178 | -12.9% |
Im getting an error on the console. I dont know if this affects the times on the profile.
Parcel watcher error on /Users/paulomogollon/Proyectos/okarai/builder: [Error: Events were dropped by the FSEvents client. File system must be re-scanned.]
Hey, thanks for your feedback @pmogollon.
Could you use the Total(Rebuild #1)
time to label “Rebuild client” and “Rebuild server” in your tables? That reflects the full refresh time for HMR being the most interesting output. If you don’t see those totals, try clearing your node_modules
, reinstalling, and profiling again.
Regarding the error: we’ve switched to a newer watcher in beta.1 that uses native cross-platform watchers. Can you share your OS and version? I’ll look for common fixes. In the meantime, does dev mode still reload on changes? Does the error show on every change or only when you start the app?
Sure, this are the results with both client and server rebuild times
osX profiling | |||
---|---|---|---|
metric | modern beta.1 | old | diff % (old-beta.1) |
Cold start | 21,546 | 33,387 | -35.5% |
Cache start | 14,484 | 14,205 | 2.0% |
Rebuild client | 13,506 | 16,447 | -17.9% |
Rebuild server | 17,285 | 20,336 | -15.0% |
Rebuild app #1 (client) | 1,131 | 1,554 | -27.2% |
Rebuild app #1 (server) | 1,538 | 1,948 | -21.0% |
The error only happens on meteor start, on reloads it doesnt happen. Everything works as expected but I get that error on the console. Im using OSX 15.4.1
For some reason every time I run the profiler, it fails, and the git diff shows it removed the last line of client/main.js
I added a new line and it works fine. Might want to make sure whatever code modifies client/main.js for rebuild testing takes into account files that may not end with a new line.
After running successfully, the working directory is no longer clean:
wreiske@Wills-MacBook-Pro-M2 bluehive-ai % git diff client server
diff --git a/client/main.js b/client/main.js
index 135d466..c127c34 100644
--- a/client/main.js
+++ b/client/main.js
@@ -154,4 +154,4 @@ Template.criticalErrorModal.helpers({
criticalError: function () {
return Session.get('criticalError');
},
-});
\ No newline at end of file
+});
diff --git a/server/main.js b/server/main.js
index fd9d474..819ac3f 100644
--- a/server/main.js
+++ b/server/main.js
@@ -2414,4 +2414,3 @@ export const supportedWhisperLanguages = [
{ name: 'Urdu', code: 'ur' },
{ name: 'Vietnamese', code: 'vi' },
{ name: 'Welsh', code: 'cy' }
-];
\ No newline at end of file
===============================
===============================
Meteor config
===============================
{
"mainModule": {
"client": "client/main.js",
"server": "server/main.js"
},
"testModule": "tests/main.js"
}
===============================
===============================
Meteor version - METEOR@3.2.2
===============================
Meteor options - --settings=settings.json
===============================
===============================
Metrics - Cold start
===============================
- Meteor(resolveConstraints): 1580 ms
- Meteor(prepareProjectForBuild): 606 ms
- Meteor(Build App): 23164 ms
- Meteor(Server startup): 861 ms
* Total(Meteor): 26211 ms
===============================
Metrics - Cache start
===============================
- Meteor(resolveConstraints): 290 ms
- Meteor(prepareProjectForBuild): 442 ms
- Meteor(Build App): 7744 ms
- Meteor(Server startup): 557 ms
* Total(Meteor): 9033 ms
===============================
Metrics - Rebuild client
===============================
- Meteor(resolveConstraints): 293 ms
- Meteor(prepareProjectForBuild): 441 ms
- Meteor(Build App): 7852 ms
- Meteor(Server startup): 543 ms
- Meteor(prepareProjectForBuild #1): 25 ms
- Meteor(Rebuild App #1): 941 ms
- Meteor(prepareProjectForBuild #2): 23 ms
- Meteor(Rebuild App #2): 683 ms
* Total(Meteor): 10801 ms
* Total(Rebuild #1): 966 ms
* Total(Rebuild #2): 706 ms \
===============================
Metrics - Rebuild server
===============================
- Meteor(resolveConstraints): 292 ms
- Meteor(prepareProjectForBuild): 444 ms
- Meteor(Build App): 7893 ms
- Meteor(Server startup): 545 ms
- Meteor(prepareProjectForBuild #1): 27 ms
- Meteor(Rebuild App #1): 1221 ms
- Meteor(Server startup #1): 525 ms
- Meteor(prepareProjectForBuild #2): 25 ms
- Meteor(Rebuild App #2): 935 ms
- Meteor(Server startup #2): 530 ms
* Total(Meteor): 12437 ms
* Total(Rebuild #1): 1773 ms
* Total(Rebuild #2): 1490 ms
===============================
===============================
Meteor version - METEOR@3.3-beta.1
===============================
Meteor options - --settings=settings.json
===============================
===============================
Metrics - Cold start
===============================
- Meteor(resolveConstraints): 1560 ms
- Meteor(prepareProjectForBuild): 561 ms
- Meteor(Build App): 6705 ms
- Meteor(Server startup): 836 ms
* Total(Meteor): 9662 ms
===============================
Metrics - Cache start
===============================
- Meteor(resolveConstraints): 319 ms -
- Meteor(prepareProjectForBuild): 584 ms
- Meteor(Build App): 3634 ms
- Meteor(Server startup): 567 ms
* Total(Meteor): 5104 ms
===============================
Metrics - Rebuild client
===============================
- Meteor(resolveConstraints): 300 ms
- Meteor(prepareProjectForBuild): 577 ms
- Meteor(Build App): 3314 ms
- Meteor(Server startup): 568 ms
- Meteor(prepareProjectForBuild #1): 107 ms
- Meteor(Rebuild App #1): 306 ms
- Meteor(prepareProjectForBuild #2): 107 ms
- Meteor(Rebuild App #2): 248 ms
* Total(Meteor): 5527 ms
* Total(Rebuild #1): 413 ms
* Total(Rebuild #2): 355 ms
===============================
Metrics - Rebuild server
===============================
- Meteor(resolveConstraints): 290 ms \
- Meteor(prepareProjectForBuild): 562 ms
- Meteor(Build App): 3304 ms
- Meteor(Server startup): 564 ms
- Meteor(prepareProjectForBuild #1): 104 ms
- Meteor(Rebuild App #1): 506 ms
- Meteor(Server startup #1): 528 ms
- Meteor(prepareProjectForBuild #2): 109 ms
- Meteor(Rebuild App #2): 412 ms
- Meteor(Server startup #2): 836 ms
* Total(Meteor): 7215 ms
* Total(Rebuild #1): 1138 ms
* Total(Rebuild #2): 1357 ms
===============================
Here’s a friendly, high-level look at what changed between Meteor 3.2.2 and 3.3-beta.1:
Total Times Comparison
Metric | 3.2.2 (ms) | 3.3-beta.1 (ms) | Δ (ms) | Δ (%) |
---|---|---|---|---|
Cold start | 26 211 | 9 662 | –16 549 | –63% faster |
Cache start | 9 033 | 5 104 | –3 929 | –43% faster |
Rebuild client | 10 801 | 5 527 | –5 274 | –49% faster |
Rebuild server | 12 437 | 7 215 | –5 222 | –42% faster |
Breakdown of Key Phases
-
Build App
- Cold start: from ~23 164 ms down to ~6 705 ms
- Cache start: from ~7 744 ms down to ~3 634 ms
- Rebuild (client): from ~7 852 ms to ~3 314 ms
- Rebuild (server): from ~7 893 ms to ~3 304 ms
This is where most of the win comes from—Meteor’s core build pipeline got a big speed boost.
-
resolveConstraints & prepareProjectForBuild
- These are roughly the same (300–600 ms range) across both versions, with small fluctuations.
-
Server startup
- Steady at ~540–860 ms in all scenarios.
-
Hot rebuilds
- Client: first delta from ~966 ms → ~413 ms (≈57% faster), second from ~706 ms → ~355 ms (≈50% faster).
- Server: first delta from ~1 773 ms → ~1 138 ms (≈36% faster), second from ~1 490 ms → ~1 357 ms (≈9% faster).
Bottom Line
Upgrading to 3.3-beta.1 slashes your build times across the board—especially the heavy “Build App” phase. Cold starts go from ~26 s to under 10 s and rebuilds are roughly twice as fast. It’s still a beta, but these gains are a solid preview of what’s coming!
I reproduced this on my Mac M1. It only shows with meteor profile
on macOS. Did you see it during a normal meteor run
in development mode?
I know this issue. I’ve struggled to force rebuilds so logs append on a new line across OSs without leaving git changes or undoing other staged work. I’ll keep working on a clean fix.
That matches my tests, most gains are in the build/rebuild phases and with those percentages. We also tried to optimize prepareProjectForBuild
and server startup. Saving a few ms is really hard in Meteor’s Node environment; offloading processing to Rust-based tools may push Node’s limits, as we did achieve with SWC.
Thanks for sharing this detailed report. They’ll encourage others to adopt the modern setup.
Btw, we also delivered improvements as part of meteor build
with both the SWC transpiler and minifier, which will affect positively on your production pipelines.
As part of Meteor 3.3 we enabled meteor profile --build
. Since this option isn’t available on 3.2.2
, could you just test meteor profile --build
in 3.3-beta.1
with and without the “modern” config at package.json
and compare the results?
@wreiske sent me here… We are trying to get the profiler running on our dev server but we use symlinks for our home directories and we think it is causing issues. It would be nice if the profiler could support running inside of a symlink.
meteor profile --settings settings.json
Meteor profiling suite cloned to: /storage/home/meicher/prj/bluehive-employer/node_modules/.cache/meteor/performance
=============================== /
Profile script
===============================
- App path: /home/meicher/prj/bluehive-employer//storage/home/meicher/prj/bluehive-employer
- App port: 3000
- Logs file: /home/meicher/prj/bluehive-employer//storage/home/meicher/prj/bluehive-employer/logs/1747812649953-bluehive-employer-bundle.log
===============================
===============================
Full log details at /home/meicher/prj/bluehive-employer//storage/home/meicher/prj/bluehive-employer/logs/1747812649953-bluehive-employer-bundle.log
===============================
===============================
Not detected entrypoint files
Please set the environment variables METEOR_CLIENT_ENTRYPOINT and METEOR_SERVER_ENTRYPOINT
Hey, how could I reproduce your setup on my system?
Let me know, because I am not familiar into using symblinks in that way. Thanks!
When running meteor profile
inside a symlinked directory, the tool incorrectly constructs the application path, resulting in a duplicated path that breaks entrypoint detection and logging. This occurs even if you’re in the resolved (non-symlinked) path.
How to Reproduce
-
Create a symlinked home directory (simulating what many HPC and enterprise environments do):
sudo ln -s /storage/home /home
-
Create a new user directory and Meteor project:
mkdir -p /storage/home/myuser/prj cd /storage/home/myuser/prj meteor create symlink-test cd symlink-test
-
(Optional but realistic) Run the project once to ensure it’s working:
meteor
-
Attempt to profile the project:
meteor profile --settings settings.json
Expected Behavior
meteor profile
should recognize the app path cleanly (e.g., /storage/home/myuser/prj/symlink-test
) and generate accurate logs and entrypoint metadata.
Actual Behavior
Even in the resolved directory (/storage/...
), Meteor appears to combine the current directory with its resolved path incorrectly:
- App path: /storage/home/myuser/prj/symlink-test//storage/home/myuser/prj/symlink-test
- Logs file: /storage/home/myuser/prj/symlink-test//storage/home/myuser/prj/symlink-test/logs/...
Resulting in errors like:
Not detected entrypoint files
Please set the environment variables METEOR_CLIENT_ENTRYPOINT and METEOR_SERVER_ENTRYPOINT
Notes
- Happens both in
/home/...
(symlink) and/storage/home/...
(real path) - The issue seems rooted in how
meteor profile
internally calculates and concatenates paths (maybe using$PWD
orrealpath
inconsistently) - Appears deterministic, not intermittent