router icon indicating copy to clipboard operation
router copied to clipboard

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

Open chorobin opened this issue 1 year ago • 2 comments

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

chorobin avatar Sep 26 '24 23:09 chorobin

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 41398dbbea1e35f5ef12ab852703cd005a8347ae. 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.

nx-cloud[bot] avatar Sep 26 '24 23:09 nx-cloud[bot]

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

pkg-pr-new[bot] avatar Sep 26 '24 23:09 pkg-pr-new[bot]