Repository navigation
Commit cee92e2
🛺 perf: make rhf more performant (#13524)
* perf: improve onChange performance
* add perf test cases
* 🚅 perf: improve setValid (#13525)
* perf: improve on dirty checking
* test out reset
* try latest cypress
* test set to chrome
* revert back
* skip the test for now
* revert back change
* perf: improve setValid (#13526)
* add test back
* test out
* perf: improve setValue (#13527)
* cache valdiation mode
* fix counter go negative
* add test guard
* improve is watch check
* improve more on setValues
* improve `shouldRenderFormState` check
* improve getDirty check
* improve more ulity functions
* improve logic folder
* perf: improve TypeScript compile-time performance
- Cap PathImpl/ArrayPathImpl recursion at 10 path segments via Prev
decrement table — bounds path union size from O(N^depth) to O(N^10)
- Remove dead IsPrimitiveLike second branch (Primitive & object = never)
- Remove always-false FieldErrors ternary (FieldValues extends IsAny<FieldValues>)
- Collapse WatchValue array check to readonly FieldPath<T>[] (mutable
arrays satisfy readonly constraint; removes one FieldPath instantiation)
- Move Prev table to path/common.ts so eager.ts imports it
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
* update api
* update
* Revert "perf: improve TypeScript compile-time performance"
This reverts commit edf775b.
* update api
* remove comments
---------
Co-authored-by: Claude Sonnet 4.6 <[email protected]>1 parent 782313f commit cee92e2
17 files changed
Lines changed: 945 additions & 179 deletions
File tree
- cypress/e2e
- src
- __tests__
- logic
- useForm
- logic
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
127 | 170 | | |
128 | 171 | | |
129 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
68 | 89 | | |
69 | 90 | | |
70 | 91 | | |
| |||
0 commit comments