René's URL Explorer Experiment


Title: perf(files): resolve name references through an index instead of listing the workspace by waleedlatif1 · Pull Request #8908 · simstudioai/sim · GitHub

Open Graph Title: perf(files): resolve name references through an index instead of listing the workspace by waleedlatif1 · Pull Request #8908 · simstudioai/sim

X Title: perf(files): resolve name references through an index instead of listing the workspace by waleedlatif1 · Pull Request #8908 · simstudioai/sim

Description: Summary A file reference that missed the exact-name lookup fell back to loading every live file in the workspace and matching in memory. A new-file existence check always misses, so each file a workflow wrote paid a full workspace read. Index the displayed name of live workspace files (displaySegmentKey, the SQL twin of normalizeDisplaySegment) and read only the rows the matcher can pick; resolution results are unchanged. Index is built CONCURRENTLY on a partial (live workspace files) predicate; no locks block reads or writes. Whitespace class shared from @sim/utils/string so the TS and SQL normalizers can't drift. Type of Change Performance improvement Testing Old vs new resolver compared on Postgres 17 over 11k references (real-world unnormalized names, folder and soft-deleted twins, ids, misses): identical results Planner: candidate lookup goes from a scan of every file in the workspace (tens of ms per lookup on a large workspace, warm cache) to BitmapOr(pkey, display-name index) at ~0.1 ms New integration cases: SQL vs TS normalization parity, resolution of unnormalized stored names, EXPLAIN uses the new index check:migrations, drizzle-kit generate (no drift), biome on changed files Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary A file reference that missed the exact-name lookup fell back to loading every live file in the workspace and matching in memory. A new-file existence check always misses, so each file a wo...

X Description: Summary A file reference that missed the exact-name lookup fell back to loading every live file in the workspace and matching in memory. A new-file existence check always misses, so each file a wo...

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

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:8388e21b-14f1-9efc-6851-bb75c7ef988e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE514:2F4711:417741:5C2077:6AFB5A55
html-safe-nonceb93a3b58d4ab2874feb401e6a6065671e962da6e9a9830b633726ed3f96b60d4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTE0OjJGNDcxMTo0MTc3NDE6NUMyMDc3OjZBRkI1QTU1IiwidmlzaXRvcl9pZCI6IjM3NTg2NzEyNTg1Nzc0OTI1NjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6099e14cccb4054d2bbe7c5ade710e80947858cb52ceb95ec023c00ff2c103cf
hovercard-subject-tagpull_request:4815003868
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/8908/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 A file reference that missed the exact-name lookup fell back to loading every live file in the workspace and matching in memory. A new-file existence check always misses, so each file a wo...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
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
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/8908/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8908%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%2F8908%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/8908/files
Reloadhttps://github.com/simstudioai/sim/pull/8908/files
Reloadhttps://github.com/simstudioai/sim/pull/8908/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)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/flat-query-latencyhttps://github.com/simstudioai/sim/tree/perf/flat-query-latency
Conversation 7 https://github.com/simstudioai/sim/pull/8908
Commits 5 https://github.com/simstudioai/sim/pull/8908/commits
Checks 48 https://github.com/simstudioai/sim/pull/8908/checks
Files changed https://github.com/simstudioai/sim/pull/8908/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8908/files
perf(files): resolve name references through an index instead of listing the workspace https://github.com/simstudioai/sim/pull/8908/files#top
Show all changes 5 commits https://github.com/simstudioai/sim/pull/8908/files
01af6af perf(files): resolve name references through an index instead of list… waleedlatif1 Oct 10, 2026 https://github.com/simstudioai/sim/pull/8908/commits/01af6afe0306b36f2e61962ea39d9ae91a19323a
82f9066 refactor(files): share the whitespace class and split the display-nam… waleedlatif1 Oct 10, 2026 https://github.com/simstudioai/sim/pull/8908/commits/82f906691d961d72d232f5703c773fbd9dcffa52
1d93b15 chore(db): format the generated migration snapshot waleedlatif1 Oct 10, 2026 https://github.com/simstudioai/sim/pull/8908/commits/1d93b15ca4128e396783a7a4f5a44d6138d0e82e
9911ba9 test(files): explain the resolver's real candidate query and fix fixt… waleedlatif1 Oct 10, 2026 https://github.com/simstudioai/sim/pull/8908/commits/9911ba930dd531ee76195fd8d7091bef7fd63f34
430b5be fix(files): break uploaded-at ties by id when picking a reference can… waleedlatif1 Oct 11, 2026 https://github.com/simstudioai/sim/pull/8908/commits/430b5bea331a5d4170fdeef6ab7cb6a28a45ed0b
Clear filters https://github.com/simstudioai/sim/pull/8908/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8908/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8908/files
file-names.integration.ts https://github.com/simstudioai/sim/pull/8908/files#diff-c16eddc45d1cff843259132f8f8d783931fb6f8b9c010b962fec060040c05e8c
workspace-file-manager.ts https://github.com/simstudioai/sim/pull/8908/files#diff-fcf305d0b37403347596bca42fc6889e9038c9f8e2c69ba20676c0f0d8fead34
path.ts https://github.com/simstudioai/sim/pull/8908/files#diff-a250e59981b276e052283d10ec3953d262cbfd38e904b3bd1d365af8a8ed2c75
0407_workspace_files_display_name_index.sql https://github.com/simstudioai/sim/pull/8908/files#diff-0377cd2f166c985ae921c188fd46e6f14bef372722ef3668c61ac9d675da5603
0407_snapshot.json https://github.com/simstudioai/sim/pull/8908/files#diff-eb56d34f3433a7b7d878acf1eea1aeebc9272c3359da35824a7d0578c5e87da2
_journal.json https://github.com/simstudioai/sim/pull/8908/files#diff-37150cc65ad16ee6fbc5fa318fc096be7730e16d63eaf863e3df5521b7030649
schema.ts https://github.com/simstudioai/sim/pull/8908/files#diff-9a959e2ce3cb4c86957bbae021d06eae364f7b0cb18964f5873bab53220af928
schema.mock.ts https://github.com/simstudioai/sim/pull/8908/files#diff-3b648ee44a059e5fc069169fdfd7c32c89200a3e79b5d0dc25227d3470da73af
string.ts https://github.com/simstudioai/sim/pull/8908/files#diff-9b50bdcf9d922aa7d14b9be1a170a437df47378c6ee3576efaaedcdf7389f503
apps/sim/lib/uploads/contexts/workspace/__integration__/file-names.integration.tshttps://github.com/simstudioai/sim/pull/8908/files#diff-c16eddc45d1cff843259132f8f8d783931fb6f8b9c010b962fec060040c05e8c
View file https://github.com/simstudioai/sim/blob/430b5bea331a5d4170fdeef6ab7cb6a28a45ed0b/apps/sim/lib/uploads/contexts/workspace/__integration__/file-names.integration.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8908/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8908/files#diff-c16eddc45d1cff843259132f8f8d783931fb6f8b9c010b962fec060040c05e8c
https://github.com/simstudioai/sim/pull/8908/files#diff-c16eddc45d1cff843259132f8f8d783931fb6f8b9c010b962fec060040c05e8c
https://github.com/simstudioai/sim/pull/8908/files#diff-c16eddc45d1cff843259132f8f8d783931fb6f8b9c010b962fec060040c05e8c
https://github.com/simstudioai/sim/pull/8908/files#diff-c16eddc45d1cff843259132f8f8d783931fb6f8b9c010b962fec060040c05e8c
https://github.com/simstudioai/sim/pull/8908/files#diff-c16eddc45d1cff843259132f8f8d783931fb6f8b9c010b962fec060040c05e8c
https://github.com/simstudioai/sim/pull/8908/files#diff-c16eddc45d1cff843259132f8f8d783931fb6f8b9c010b962fec060040c05e8c
apps/sim/lib/uploads/contexts/workspace/workspace-file-manager.tshttps://github.com/simstudioai/sim/pull/8908/files#diff-fcf305d0b37403347596bca42fc6889e9038c9f8e2c69ba20676c0f0d8fead34
View file https://github.com/simstudioai/sim/blob/430b5bea331a5d4170fdeef6ab7cb6a28a45ed0b/apps/sim/lib/uploads/contexts/workspace/workspace-file-manager.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8908/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8908/files#diff-fcf305d0b37403347596bca42fc6889e9038c9f8e2c69ba20676c0f0d8fead34
https://github.com/simstudioai/sim/pull/8908/files#diff-fcf305d0b37403347596bca42fc6889e9038c9f8e2c69ba20676c0f0d8fead34
https://github.com/simstudioai/sim/pull/8908/files#diff-fcf305d0b37403347596bca42fc6889e9038c9f8e2c69ba20676c0f0d8fead34
https://github.com/simstudioai/sim/pull/8908/files#diff-fcf305d0b37403347596bca42fc6889e9038c9f8e2c69ba20676c0f0d8fead34
https://github.com/simstudioai/sim/pull/8908/files#diff-fcf305d0b37403347596bca42fc6889e9038c9f8e2c69ba20676c0f0d8fead34
https://github.com/simstudioai/sim/pull/8908/files#diff-fcf305d0b37403347596bca42fc6889e9038c9f8e2c69ba20676c0f0d8fead34
apps/sim/lib/vfs/path.tshttps://github.com/simstudioai/sim/pull/8908/files#diff-a250e59981b276e052283d10ec3953d262cbfd38e904b3bd1d365af8a8ed2c75
View file https://github.com/simstudioai/sim/blob/430b5bea331a5d4170fdeef6ab7cb6a28a45ed0b/apps/sim/lib/vfs/path.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8908/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8908/files#diff-a250e59981b276e052283d10ec3953d262cbfd38e904b3bd1d365af8a8ed2c75
https://github.com/simstudioai/sim/pull/8908/files#diff-a250e59981b276e052283d10ec3953d262cbfd38e904b3bd1d365af8a8ed2c75
https://github.com/simstudioai/sim/pull/8908/files#diff-a250e59981b276e052283d10ec3953d262cbfd38e904b3bd1d365af8a8ed2c75
packages/db/migrations/0407_workspace_files_display_name_index.sqlhttps://github.com/simstudioai/sim/pull/8908/files#diff-0377cd2f166c985ae921c188fd46e6f14bef372722ef3668c61ac9d675da5603
View file https://github.com/simstudioai/sim/blob/430b5bea331a5d4170fdeef6ab7cb6a28a45ed0b/packages/db/migrations/0407_workspace_files_display_name_index.sql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8908/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/8908/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8908/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.