René's URL Explorer Experiment


Title: perf(frontend): bound logs DOM, kill editor re-render storms, lazy-load heavy deps by waleedlatif1 · Pull Request #5212 · simstudioai/sim · GitHub

Open Graph Title: perf(frontend): bound logs DOM, kill editor re-render storms, lazy-load heavy deps by waleedlatif1 · Pull Request #5212 · simstudioai/sim

X Title: perf(frontend): bound logs DOM, kill editor re-render storms, lazy-load heavy deps by waleedlatif1 · Pull Request #5212 · simstudioai/sim

Description: Summary Five targeted, independently-verified frontend performance fixes — each addresses a measured, user-felt problem in a hot path. No behavior change; all are backwards-compatible. perf(logs) — virtualize the resource list. The logs page accumulated useInfiniteQuery pages into an unbounded, unvirtualized DOM (50 → thousands of rows = compounding scroll jank + unbounded memory). Now windowed with @tanstack/react-virtual (table→CSS-grid, exact ratios preserved). Keyboard-nav scroll routes through the virtualizer (scrollToIndex) via an optional apiRef, so it works even when a row is windowed out. All 6 ResourceTable consumers preserved. perf(editor) — narrow the per-block store subscription. Every mounted WorkflowBlock subscribed to the whole blocks map, so any structural edit (rename, lock/enable, dimension settle, paste) re-rendered every block. New useBlockCurrentWorkflow subscribes to state.blocks[blockId] only — block B no longer re-renders on a block-A edit (immutable per-block updates keep B's reference stable). perf(realtime) — move presence out of the socket context. presenceUsers lived in the memoized socket context value, so every remote cursor frame (many/sec) produced a new context reference and re-rendered the 4k-line WorkflowContent. Presence moved to a dedicated Zustand store; only / subscribe. Writer-for-writer identical; cleared on unmount to match the prior lifetime. perf(editor) — lazy-load NoteBlock. Streamdown + remark-breaks shipped to 100% of editor loads via a static nodeType, even for workflows with no note blocks. Now next/dynamic (stable nodeTypes map preserved). perf(emcn) — defer prismjs in Code. prism + 3 side-effectful grammars sat in the @/components/emcn barrel (379 importers). Split the side-effectful imports into code/prism.ts, lazy-loaded on first highlight; the two synchronous highlight/languages consumers stay eager via the split module. Type of Change Performance improvement (no behavior change) Testing Each change was reviewed by a dedicated adversarial auditor (line-by-line vs origin/staging), then re-reviewed after a keyboard-nav fix the audit caught. Plus /simplify + /cleanup (reuse/simplification/efficiency/altitude + React anti-patterns) over all touched files and surrounding modules. tsc 0 new errors · Biome clean · check:zustand-v5 / check:client-boundary / check:react-query pass · targeted tests green · full next build green. The render-path behaviors that can't be unit-tested (logs arrow-key scroll, 2-collaborator cursor, note-block render) warrant a quick manual smoke before merge. Checklist Code follows project style guidelines Self-reviewed (5 adversarial audits + cleanup passes) 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 Five targeted, independently-verified frontend performance fixes — each addresses a measured, user-felt problem in a hot path. No behavior change; all are backwards-compatible. perf(logs) ...

X Description: Summary Five targeted, independently-verified frontend performance fixes — each addresses a measured, user-felt problem in a hot path. No behavior change; all are backwards-compatible. perf(logs) ...

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

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:a112d414-1c25-526e-f453-92e17443ed30
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9FCC:11B62D:A26B1:E6846:6AFB45CC
html-safe-noncec9a707e9d7e804778504270bb36497c59ff4c883dc652acd012dad9199391fd2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkNDOjExQjYyRDpBMjZCMTpFNjg0Njo2QUZCNDVDQyIsInZpc2l0b3JfaWQiOiIzMDM4NDgyOTY0NzY2NDc1NzI0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmace494fbb4da41bba058e6dee3b4a3ea8bf9236c38496f449abbc1a036076fe452
hovercard-subject-tagpull_request:3938023356
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/5212/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 Five targeted, independently-verified frontend performance fixes — each addresses a measured, user-felt problem in a hot path. No behavior change; all are backwards-compatible. perf(logs) ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
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
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/5212/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5212%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%2F5212%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/5212/files
Reloadhttps://github.com/simstudioai/sim/pull/5212/files
Reloadhttps://github.com/simstudioai/sim/pull/5212/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
chore/frontend-hygiene-assessmenthttps://github.com/simstudioai/sim/tree/chore/frontend-hygiene-assessment
Conversation 12 https://github.com/simstudioai/sim/pull/5212
Commits 5 https://github.com/simstudioai/sim/pull/5212/commits
Checks 15 https://github.com/simstudioai/sim/pull/5212/checks
Files changed https://github.com/simstudioai/sim/pull/5212/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5212/files
perf(frontend): bound logs DOM, kill editor re-render storms, lazy-load heavy deps https://github.com/simstudioai/sim/pull/5212/files#top
Show all changes 5 commits https://github.com/simstudioai/sim/pull/5212/files
be4a675 perf(logs): virtualize the resource list to bound DOM + memory waleedlatif1 Jun 25, 2026 https://github.com/simstudioai/sim/pull/5212/commits/be4a675cd4f72762ef9a923b7f2eb0c70ee9af35
bff6910 perf(editor): narrow per-block store subscription to kill structural-… waleedlatif1 Jun 25, 2026 https://github.com/simstudioai/sim/pull/5212/commits/bff6910a81591c096f0e100f2e933de9b5c07981
dfcfdfc perf(realtime): move presence state out of the socket context to stop… waleedlatif1 Jun 25, 2026 https://github.com/simstudioai/sim/pull/5212/commits/dfcfdfccb383893b19eefdf6f37ef5b795097822
a833e7b perf(editor): lazy-load NoteBlock so Streamdown is off the editor's c… waleedlatif1 Jun 25, 2026 https://github.com/simstudioai/sim/pull/5212/commits/a833e7b7625714456a65b5fae34807e340eaf5fa
4c50a3f perf(emcn): defer prismjs in Code so it's off the shared barrel's sta… waleedlatif1 Jun 25, 2026 https://github.com/simstudioai/sim/pull/5212/commits/4c50a3f9dff44aa32073c7436bd3b6c9e24b7e24
Clear filters https://github.com/simstudioai/sim/pull/5212/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5212/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5212/files
index.ts https://github.com/simstudioai/sim/pull/5212/files#diff-cf629c9c117e79c29a199a88c1f887a4cc2448be93dda99bb99b13bea3561210
resource.tsx https://github.com/simstudioai/sim/pull/5212/files#diff-0a8b4241a80381381e908b7da57edc5b1a8e7c6f6c9f2ae6d199cb1b2f4c8f22
files.tsx https://github.com/simstudioai/sim/pull/5212/files#diff-0284e2e46ba0636bd37fb01a0bee2a53844af9bbaf0a5879e3b182c0f34e67a9
logs.tsx https://github.com/simstudioai/sim/pull/5212/files#diff-7e8687c87d3458a17d7dab33773b35cfe0c15b0efe5078d511cc6ea3f0d01bb9
cursors.tsx https://github.com/simstudioai/sim/pull/5212/files#diff-1f1559f06b48f43ff7e3989308b1b92ceacaef2f6035a1341480a010ad37fbe0
use-block-current-workflow.ts https://github.com/simstudioai/sim/pull/5212/files#diff-b3097eb144f6681a4eca04f4cb33d59b1573de6eb31804968c4e9f9cb655015e
use-block-visual.ts https://github.com/simstudioai/sim/pull/5212/files#diff-0e85a159fa5451ec7d4b452c58c5fd59e6aad1c2ac74bf95e338803de2b5bf9d
workflow-constants.ts https://github.com/simstudioai/sim/pull/5212/files#diff-ec96c2510f5f5f35f6ada7d86fd29ec61aa07464509b6d5ebf789c7c4d60ca6b
avatars.tsx https://github.com/simstudioai/sim/pull/5212/files#diff-c87c294983f4e143c8cb3018a277c269d7e38b2a1361236e71a0705b7dc353b3
socket-provider.tsx https://github.com/simstudioai/sim/pull/5212/files#diff-645e13e3a4827b0a88e66b25a614a116dd7838dddb42745a86247d3a8ca8ab61
code.tsx https://github.com/simstudioai/sim/pull/5212/files#diff-2410b9d2e5387f5d7a020df2e08d15e4c0c3673f436d381dfee743025de53307
prism.ts https://github.com/simstudioai/sim/pull/5212/files#diff-15009f009409a9444b17cf47e7fc808737b7fb57d7ae7cb8fad92b8243fe253f
index.ts https://github.com/simstudioai/sim/pull/5212/files#diff-752a5362437bf3a92be2e9d638363ebbc9c231f0d89bc55b8a2ce65c8bc2d2b6
store.ts https://github.com/simstudioai/sim/pull/5212/files#diff-b94135d49e169a993059aae8ac042708c8978d7fff388e4d0a623fb15047cb3d
types.ts https://github.com/simstudioai/sim/pull/5212/files#diff-91cf63b6e73ad50b365bfb87381ec4789eaea0cf109237d74c852f971ba55c19
apps/sim/app/workspace/[workspaceId]/components/index.tshttps://github.com/simstudioai/sim/pull/5212/files#diff-cf629c9c117e79c29a199a88c1f887a4cc2448be93dda99bb99b13bea3561210
View file https://github.com/simstudioai/sim/blob/4c50a3f9dff44aa32073c7436bd3b6c9e24b7e24/apps/sim/app/workspace/%5BworkspaceId%5D/components/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5212/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5212/files#diff-cf629c9c117e79c29a199a88c1f887a4cc2448be93dda99bb99b13bea3561210
https://github.com/simstudioai/sim/pull/5212/files#diff-cf629c9c117e79c29a199a88c1f887a4cc2448be93dda99bb99b13bea3561210
Please reload this pagehttps://github.com/simstudioai/sim/pull/5212/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5212/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.