René's URL Explorer Experiment


Title: perf(tests): mock the tool registry globally, drop the dead deps optimizer by waleedlatif1 · Pull Request #6117 · simstudioai/sim · GitHub

Open Graph Title: perf(tests): mock the tool registry globally, drop the dead deps optimizer by waleedlatif1 · Pull Request #6117 · simstudioai/sim

X Title: perf(tests): mock the tool registry globally, drop the dead deps optimizer by waleedlatif1 · Pull Request #6117 · simstudioai/sim

Description: Summary The test suite spent far more time importing modules than running them — import was 1,399s aggregate against 88s of actual tests. This cuts the full suite 45%, with zero coverage lost. Lint and Test is currently the CI critical path (p50 189s vs Build App's 150s), and ~143s of it is the test run. Where the cost was — measured per area lib/core touches no registry and sets the floor at 0.09s/file. Everything that reaches the tool registry graph: area files import per-file × floor blocks 25 177.9s 7.12s 79× providers 53 193.2s 3.65s 41× executor 64 196.2s 3.07s 34× tools 78 159.9s 2.05s 23× app/api 204 214.7s 1.05s 12× lib/core 50 4.6s 0.09s — The tool registry is 4,351 entries pulling ~5,907 modules, and almost nothing under test needs the real thing. @/blocks/registry was already globally mocked for exactly this reason — this extends the same pattern to @/tools/registry. Result — full suite, same commit, same machine baseline after Duration 166.21s 91.56s −45% import 1399.17s 617.08s −56% transform 141.80s 61.98s −56% setup 259.00s 203.61s −21% Test Files 1 failed / 1252 passed 1 failed / 1252 passed identical Tests 1 failed / 16873 passed 1 failed / 16873 passed identical The single failure reproduces on unmodified staging — cloud-review-tools.test.ts can't find rg from its spawned python3 on macOS. CI installs ripgrep explicitly and it passes there. No coverage was removed Four files genuinely assert tool registration or tool params. They opt out with vi.unmock('@/tools/registry') rather than being weakened or deleted — outlook, azure_devops, and the two search-replace suites. Each carries a comment explaining why, so the pattern is discoverable for the next person who needs the real registry. These are exactly the tests that catch blocks and tools drifting apart, which is the kind of breakage that ships silently. Deleting them to make the number work would have been trading correctness for speed. deps.optimizer was dead config — measured, not assumed It was set to web, which only applies to client environments (jsdom/happy-dom), while 985 of 1,219 files declare @vitest-environment node. Vitest's docs are explicit that node/edge use ssr. I measured both ways rather than just "fixing" it to ssr: config Duration import baseline (web) 19.33s 135.30s removed 19.23s 136.37s switched to ssr + include list for openai / Anthropic / Google / Bedrock SDKs 19.19s 136.69s All identical within noise. The cost is first-party module graph, which the optimizer doesn't touch — it only bundles node_modules. So the honest move is deleting it, not leaving config that reads as if it does something. Also fixes a latent mock gap Adds the missing getBlockRegistry accessor to the @/blocks/registry mock. #6083 renamed that export and the mock was never updated, so any test reaching those three consumers would have hit getBlockRegistry is not a function. Nothing exercises them today — this closes it before someone trips on it. Rejected, with evidence isolate: false is ~20% faster (import 136.6s → 110.4s on a 145-file set) but leaks state between files — it broke two doc-servable tests on the first run that pass under isolation. Correctness over speed. Type of Change Performance Improvement (dead config removal, mock fidelity) Testing Full suite run both ways on the same machine (table above). tsc --noEmit exit 0. biome check clean. Each of the four opt-out files verified individually: outlook 21/21, azure-devops 28/28, indexer 58/58, replacements 32/32.

Open Graph Description: Summary The test suite spent far more time importing modules than running them — import was 1,399s aggregate against 88s of actual tests. This cuts the full suite 45%, with zero coverage lost. Lint...

X Description: Summary The test suite spent far more time importing modules than running them — import was 1,399s aggregate against 88s of actual tests. This cuts the full suite 45%, with zero coverage lost. Lint...

Opengraph URL: https://github.com/simstudioai/sim/pull/6117

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c48c3193-bb5e-9d8a-6831-bb49b610e904
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB4E6:AF687:832243:B4F671:6AFB469E
html-safe-nonce3d48c7f46f120a17febd48ed764b3d12e64ba651e44ba240636413475a02cc2c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEU2OkFGNjg3OjgzMjI0MzpCNEY2NzE6NkFGQjQ2OUUiLCJ2aXNpdG9yX2lkIjoiMzY2MTgzMDQwNjE2MTUxNjE5MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf39410fc2dd5db8d414b41671437063aa01df068bb93ed16d8191b612c4fbc69
hovercard-subject-tagpull_request:4174600221
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6117/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary The test suite spent far more time importing modules than running them — import was 1,399s aggregate against 88s of actual tests. This cuts the full suite 45%, with zero coverage lost. Lint...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneacf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release26504db649b58525278f77a52b80ba5f10d5f4de
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6117/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6117%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6117%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6117/files
Reloadhttps://github.com/simstudioai/sim/pull/6117/files
Reloadhttps://github.com/simstudioai/sim/pull/6117/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests199 (199)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
perf/vitest-deps-optimizerhttps://github.com/simstudioai/sim/tree/perf/vitest-deps-optimizer
Conversation 7 https://github.com/simstudioai/sim/pull/6117
Commits 2 https://github.com/simstudioai/sim/pull/6117/commits
Checks 27 https://github.com/simstudioai/sim/pull/6117/checks
Files changed https://github.com/simstudioai/sim/pull/6117/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6117/files
perf(tests): mock the tool registry globally, drop the dead deps optimizer https://github.com/simstudioai/sim/pull/6117/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/6117/files
36550a1 perf(tests): mock the tool registry globally, drop the dead deps opti… waleedlatif1 Jul 31, 2026 https://github.com/simstudioai/sim/pull/6117/commits/36550a157d5fe8a1be1ad667df5b6fcdf36f8d9c
27af851 docs(tests): explain why the search-replace registry opt-outs are loa… waleedlatif1 Jul 31, 2026 https://github.com/simstudioai/sim/pull/6117/commits/27af851c2bd051b9c2996cc55efc789a4c710e3e
Clear filters https://github.com/simstudioai/sim/pull/6117/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6117/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6117/files
outlook.test.ts https://github.com/simstudioai/sim/pull/6117/files#diff-acc9a4b113d9670fa1d8f84826150fddbe8ffad2d82558c0084816da96b0e915
indexer.test.ts https://github.com/simstudioai/sim/pull/6117/files#diff-5ffc04e0dbdd5ef8efa2d91372c71ecf297365c14b31b2c22b9253bc395b6615
replacements.test.ts https://github.com/simstudioai/sim/pull/6117/files#diff-f88f40bf48930080af9e572dc105a4a4ee65aade3fa56a5e20d1a3fa91793633
azure-devops.test.ts https://github.com/simstudioai/sim/pull/6117/files#diff-19e79b9baa3358506ecd43dd60d9cace8b362218b7f9f7ccf36e9cb37e822e78
vitest.config.ts https://github.com/simstudioai/sim/pull/6117/files#diff-a4f9d1fb5f8b198464434b51d80f6f5cb4bd254ae2977ff981f37f8c0f1dc277
vitest.setup.ts https://github.com/simstudioai/sim/pull/6117/files#diff-1c83d21da09a2c5f53044c10fa0e0a257cccd112a3f4a1156f9e258554abbb3c
apps/sim/blocks/blocks/outlook.test.tshttps://github.com/simstudioai/sim/pull/6117/files#diff-acc9a4b113d9670fa1d8f84826150fddbe8ffad2d82558c0084816da96b0e915
View file https://github.com/simstudioai/sim/blob/27af851c2bd051b9c2996cc55efc789a4c710e3e/apps/sim/blocks/blocks/outlook.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6117/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6117/files#diff-acc9a4b113d9670fa1d8f84826150fddbe8ffad2d82558c0084816da96b0e915
https://github.com/simstudioai/sim/pull/6117/files#diff-acc9a4b113d9670fa1d8f84826150fddbe8ffad2d82558c0084816da96b0e915
apps/sim/lib/workflows/search-replace/indexer.test.tshttps://github.com/simstudioai/sim/pull/6117/files#diff-5ffc04e0dbdd5ef8efa2d91372c71ecf297365c14b31b2c22b9253bc395b6615
View file https://github.com/simstudioai/sim/blob/27af851c2bd051b9c2996cc55efc789a4c710e3e/apps/sim/lib/workflows/search-replace/indexer.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6117/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6117/files#diff-5ffc04e0dbdd5ef8efa2d91372c71ecf297365c14b31b2c22b9253bc395b6615
Please reload this pagehttps://github.com/simstudioai/sim/pull/6117/files
https://github.com/simstudioai/sim/pull/6117/files#diff-5ffc04e0dbdd5ef8efa2d91372c71ecf297365c14b31b2c22b9253bc395b6615
apps/sim/lib/workflows/search-replace/replacements.test.tshttps://github.com/simstudioai/sim/pull/6117/files#diff-f88f40bf48930080af9e572dc105a4a4ee65aade3fa56a5e20d1a3fa91793633
View file https://github.com/simstudioai/sim/blob/27af851c2bd051b9c2996cc55efc789a4c710e3e/apps/sim/lib/workflows/search-replace/replacements.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6117/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6117/files#diff-f88f40bf48930080af9e572dc105a4a4ee65aade3fa56a5e20d1a3fa91793633
https://github.com/simstudioai/sim/pull/6117/files#diff-f88f40bf48930080af9e572dc105a4a4ee65aade3fa56a5e20d1a3fa91793633
apps/sim/tools/azure_devops/azure-devops.test.tshttps://github.com/simstudioai/sim/pull/6117/files#diff-19e79b9baa3358506ecd43dd60d9cace8b362218b7f9f7ccf36e9cb37e822e78
View file https://github.com/simstudioai/sim/blob/27af851c2bd051b9c2996cc55efc789a4c710e3e/apps/sim/tools/azure_devops/azure-devops.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6117/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6117/files#diff-19e79b9baa3358506ecd43dd60d9cace8b362218b7f9f7ccf36e9cb37e822e78
https://github.com/simstudioai/sim/pull/6117/files#diff-19e79b9baa3358506ecd43dd60d9cace8b362218b7f9f7ccf36e9cb37e822e78
apps/sim/vitest.config.tshttps://github.com/simstudioai/sim/pull/6117/files#diff-a4f9d1fb5f8b198464434b51d80f6f5cb4bd254ae2977ff981f37f8c0f1dc277
View file https://github.com/simstudioai/sim/blob/27af851c2bd051b9c2996cc55efc789a4c710e3e/apps/sim/vitest.config.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6117/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6117/files#diff-a4f9d1fb5f8b198464434b51d80f6f5cb4bd254ae2977ff981f37f8c0f1dc277
https://github.com/simstudioai/sim/pull/6117/files#diff-a4f9d1fb5f8b198464434b51d80f6f5cb4bd254ae2977ff981f37f8c0f1dc277
apps/sim/vitest.setup.tshttps://github.com/simstudioai/sim/pull/6117/files#diff-1c83d21da09a2c5f53044c10fa0e0a257cccd112a3f4a1156f9e258554abbb3c
View file https://github.com/simstudioai/sim/blob/27af851c2bd051b9c2996cc55efc789a4c710e3e/apps/sim/vitest.setup.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6117/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6117/files#diff-1c83d21da09a2c5f53044c10fa0e0a257cccd112a3f4a1156f9e258554abbb3c
https://github.com/simstudioai/sim/pull/6117/files#diff-1c83d21da09a2c5f53044c10fa0e0a257cccd112a3f4a1156f9e258554abbb3c
https://github.com/simstudioai/sim/pull/6117/files#diff-1c83d21da09a2c5f53044c10fa0e0a257cccd112a3f4a1156f9e258554abbb3c
Please reload this pagehttps://github.com/simstudioai/sim/pull/6117/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.