Commit 69f4501
fix: handle long text values performantly (#1874)
* test: add test for long text performance
This test fails in the current state, as jsondiffpatch
uses the diff-match-patch library for long text diffing.
This text diff is very slow, but produces a nice delta that
can be used to see the difference between two text strings.
However, we don't actually care about identifying the specific
differences between two strings - we just care if they changed.
The regular text diffing strategy is MUCH faster, and performance
is what we want to prioritize.
- https://github.com/benjamine/jsondiffpatch/blob/master/docs/deltas.md#text-diffs
- https://github.com/google/diff-match-patch
* fix: disable diff-match-patch for long string diff
jsondiffpatch uses diff-match-patch for long text diffing.
This text diff is very slow, but produces a nice delta that
can be used to see the difference between two text strings.
However, we don't actually care about identifying the specific
differences between two strings - we just care if they changed.
The regular text diffing strategy is MUCH faster, and performance
is what we want to prioritize.
- https://github.com/benjamine/jsondiffpatch/blob/master/docs/deltas.md#text-diffs
- https://github.com/google/diff-match-patch
* docs: add changeset
---------
Co-authored-by: Markus Azer <markusgihady@gmail.com>1 parent ea17aa2 commit 69f4501
3 files changed
Lines changed: 85 additions & 5 deletions
File tree
- .changeset
- packages/sync-actions
- src/utils
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 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 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
119 | 191 | | |
120 | 192 | | |
121 | 193 | | |
| |||
0 commit comments