Commit 07e26e3
committed
[PERF] account: optimize migration performance by pre-creating column
and bulk transferring invoice_date
Pre-create the target column to avoid triggering compute() during
update,
and perform a direct bulk data transfer from account_move to
account_move_line.
This avoids ORM overhead, reduces heap rewrites, and prevents
unnecessary
recomputation on 15M move lines.
Performance result:
- Previous approach: ~2 hours
- Optimized approach: ~15 minutes
(~8x faster)1 parent 6a86957 commit 07e26e3
File tree
2 files changed
+22
-1
lines changed- openupgrade_scripts/scripts/account/17.0.1.2
2 files changed
+22
-1
lines changedLines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
207 | 227 | | |
208 | 228 | | |
209 | 229 | | |
| |||
289 | 309 | | |
290 | 310 | | |
291 | 311 | | |
| 312 | + | |
292 | 313 | | |
293 | 314 | | |
294 | 315 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
0 commit comments