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

perf(react-router): improve resolve relative route and use intersections for checking path #2425

Merged
merged 13 commits into from
Dec 16, 2024

Conversation

chorobin
Copy link
Contributor

@chorobin chorobin commented Sep 26, 2024

Decreasing overall check time and instantiations.

Before:

> tsc --extendedDiagnostics

Files:                         683
Lines of Library:            41276
Lines of Definitions:        86334
Lines of TypeScript:         24509
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                144211
Symbols:                    387083
Types:                      114916
Instantiations:             738510
Memory used:               394499K
Assignability cache size:    45732
Identity cache size:          8525
Subtype cache size:          44038
Strict subtype cache size:      10
I/O Read time:               0.10s
Parse time:                  0.59s
ResolveModule time:          0.19s
ResolveTypeReference time:   0.00s
ResolveLibrary time:         0.03s
Program time:                1.05s
Bind time:                   0.31s
Check time:                  5.88s
printTime time:              0.00s
Emit time:                   0.00s
Total time:                  7.24s

After:

> tsc --extendedDiagnostics

Files:                         679
Lines of Library:            41276
Lines of Definitions:        83242
Lines of TypeScript:         24485
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                140221
Symbols:                    370974
Types:                      113612
Instantiations:             695636
Memory used:               398422K
Assignability cache size:    41080
Identity cache size:          8525
Subtype cache size:          45560
Strict subtype cache size:      17
I/O Read time:               0.09s
Parse time:                  0.57s
ResolveModule time:          0.17s
ResolveTypeReference time:   0.00s
ResolveLibrary time:         0.02s
Program time:                0.97s
Bind time:                   0.35s
Check time:                  5.47s
printTime time:              0.00s
Emit time:                   0.00s
Total time:                  6.79s

Copy link

nx-cloud bot commented Sep 26, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 41398db. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx affected --targets=test:eslint,test:unit,test:e2e,test:types,test:build,build --parallel=3
✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Copy link

pkg-pr-new bot commented Sep 26, 2024

Open in Stackblitz

More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@2425

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@2425

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@2425

@tanstack/create-router

npm i https://pkg.pr.new/@tanstack/create-router@2425

@tanstack/react-cross-context

npm i https://pkg.pr.new/@tanstack/react-cross-context@2425

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@2425

@tanstack/react-router-with-query

npm i https://pkg.pr.new/@tanstack/react-router-with-query@2425

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@2425

@tanstack/router-devtools

npm i https://pkg.pr.new/@tanstack/router-devtools@2425

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@2425

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@2425

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@2425

@tanstack/start

npm i https://pkg.pr.new/@tanstack/start@2425

@tanstack/start-vite-plugin

npm i https://pkg.pr.new/@tanstack/start-vite-plugin@2425

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@2425

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@2425

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@2425

commit: 41398db

@chorobin chorobin force-pushed the perf-resolve-relative branch 2 times, most recently from 0f8d06d to e08307c Compare December 15, 2024 20:00
@chorobin chorobin force-pushed the perf-resolve-relative branch from e08307c to eaa6644 Compare December 15, 2024 20:01
@chorobin chorobin marked this pull request as ready for review December 15, 2024 20:08
@chorobin chorobin force-pushed the perf-resolve-relative branch from 3d489bf to 5f7bde5 Compare December 16, 2024 21:01
@chorobin chorobin force-pushed the perf-resolve-relative branch from 3573ec6 to a33215a Compare December 16, 2024 22:07
@chorobin chorobin merged commit cb1b65e into main Dec 16, 2024
4 of 5 checks passed
@chorobin chorobin deleted the perf-resolve-relative branch December 16, 2024 22:41
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.

1 participant