Repository navigation
Commit 65135b5
Append layout objects without rebuilding the existing array
add_annotation, add_shape, add_layout_image and add_selection appended
with `self.layout[prop] += (new_obj,)`. That re-validated every existing
element into a fresh copy, and each copy looked up its own props with an
O(N) identity scan, so one append cost O(N^2) and N appends O(N^3).
_append_array_prop validates only the new element and keeps the
existing ones. Batch mode keeps the old path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 83a023c commit 65135b5
2 files changed
Lines changed: 34 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1627 | 1627 | | |
1628 | 1628 | | |
1629 | 1629 | | |
1630 | | - | |
| 1630 | + | |
1631 | 1631 | | |
1632 | 1632 | | |
1633 | 1633 | | |
| |||
5369 | 5369 | | |
5370 | 5370 | | |
5371 | 5371 | | |
| 5372 | + | |
| 5373 | + | |
| 5374 | + | |
| 5375 | + | |
| 5376 | + | |
| 5377 | + | |
| 5378 | + | |
| 5379 | + | |
| 5380 | + | |
| 5381 | + | |
| 5382 | + | |
| 5383 | + | |
| 5384 | + | |
| 5385 | + | |
| 5386 | + | |
| 5387 | + | |
| 5388 | + | |
| 5389 | + | |
| 5390 | + | |
| 5391 | + | |
| 5392 | + | |
| 5393 | + | |
| 5394 | + | |
| 5395 | + | |
| 5396 | + | |
| 5397 | + | |
| 5398 | + | |
| 5399 | + | |
| 5400 | + | |
| 5401 | + | |
| 5402 | + | |
| 5403 | + | |
5372 | 5404 | | |
5373 | 5405 | | |
5374 | 5406 | | |
| |||
0 commit comments