GeezerVison is showing github.com — perf(table): 표 구조 편집의 줄 배치 캐시 견주기를 7.0.0과 같은 판정 그대로 덜 들여 한다 (#814) · airmang/python-hwpx@e2bce65
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: CHANGELOG.md +9Lines changed: 9 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 | - `python -m hwpx.capabilities`(`describe_capabilities()`)가 빈 extra `visual`·`xlsx`·`preview`를 맨 설치에서도 `true`로 | 10 | 10 | 보고했다. 아무것도 끌어오지 않는 extra이므로 `false`로 보고하고, 까닭과 그 기능이 있는 곳(python-hwpx-automation)을 | 11 | 11 | `extrasNote`에 적는다. 있던 키는 그대로다. | | 12 | +- 표의 행·열 넣기·지우기와 칸 나누기(`table.insert_rows`·`insert_columns`·`delete_rows`·`delete_columns`·`split_cell`과 | | 13 | + `doc.tables`의 같은 이름)가 6.12.0보다 느려진 것을 줄였다. 7.0은 옛 줄 배치 캐시가 표를 고친 뒤에 남지 않게 편집의 앞뒤에서 | | 14 | + 구역의 모든 캐시를 견주는데, 7.0.0은 그때마다 캐시를 가진 문단을 모두 다시 요약했다. 그래서 칸 몇 개짜리 표에 행 하나를 | | 15 | + 넣는 시간이 구역 길이를 따라갔다. 견주는 규칙과 때(편집 앞뒤 두 번, 구역의 모든 캐시)는 그대로 두고, 지난번 견줄 때와 같은 | | 16 | + 본문 문단(바이트와 물려받는 이름공간 선언까지)은 다시 요약하지 않게 했다. XML로 직접 고친 것도, 편집이 표 밖에 붙이는 것(쓰기를 | | 17 | + 기다리던 구역 설정 등)도 그 비교에서 드러나므로 전처럼 본다. 표가 있는 문서 53건에서 방금 연 문서의 첫 편집은 6.12.0의 | | 18 | + 중앙값 2.04배 → 1.64배, 같은 표에 한 번 더 넣을 때는 1.58배 → 1.23배다(4 MB 구역: 첫 편집 370 → 272 ms, 두 번째 | | 19 | + 214 → 151 ms, 6.12.0은 81 · 68 ms). 6.12.0보다 남은 것은 편집마다 구역을 두 번 직렬화해 견주는 값과 구역의 첫 편집에서 | | 20 | + 파트를 한 번 다시 읽는 값이다. 편집 뒤의 읽기·쪽 어림·저장 결과는 7.0.0과 같다. | 12 | 21 |
| 13 | 22 | ## [7.0.0] - 2026-11-21 | 14 | 23 |
| |
Collapse file Copy file name to clipboardExpand all lines: docs/architecture/module-ownership.json +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 579 | 579 | "approvedBy": "asks10-table-rows", | 580 | 580 | "rationale": "A table's rows moved or copied as a block (table.move_rows, table.copy_rows): every hp:tr of the block goes, every cell's rowAddr and the table's rowCnt are numbered again, copies get fresh paragraph, object and field ids, and a merged cell reaching across the block's edges or the place it goes to is refused before anything changes. TableStructureEdits keeps the documented methods and delegates. A new module rather than more table.py lines: that owner file sits near its code-line review line. Format-level only." | 581 | 581 | }, | | 582 | + { | | 583 | + "path": "src/hwpx/oxml/_line_caches.py", | | 584 | + "disposition": "core", | | 585 | + "approvedBy": "perf/table-edits", | | 586 | + "rationale": "The net under the editing APIs for a line cache (hp:linesegarray) left on a paragraph whose content changed: which caches a section watches and how they are judged against the part as read. Moved out of section.py with its rule as it was (same digest, same comparison, every cache of the section judged at every judgement, so a save and a table's structure edit leave what they left). What it adds is how a judgement gets there for less: a body paragraph whose bytes did not change since the last judgement is not digested paragraph by paragraph again, the part as read is digested only where the tree differs from it, and the judgement straight after a table's rebuild looks at the rebuilt table's block alone. A new module rather than more section.py lines. Format-level only." | | 587 | + }, | 582 | 588 | { | 583 | 589 | "path": "src/hwpx/oxml/text_ranges.py", | 584 | 590 | "disposition": "core", | |
Collapse file Copy file name to clipboardExpand all lines: pyproject.toml +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -323,6 +323,9 @@ files = [ | 323 | 323 | "src/hwpx/oxml/caret.py", | 324 | 324 | # Moving and copying a table's rows (asks10d) -- born in the gate, per the WP-A rule. | 325 | 325 | "src/hwpx/oxml/table_rows.py", | | 326 | + # Line caches that outlived their paragraph's content: what a section watches and how a save or a | | 327 | + # table's structure edit judges it, moved out of section.py -- born in the gate, per the WP-A rule. | | 328 | + "src/hwpx/oxml/_line_caches.py", | 326 | 329 | # A save's ZIP records: read where each entry lies, write an archive from whole records, so an | 327 | 330 | # untouched part keeps its compressed bytes (exec7/zlib-bytes) -- born in the gate, per the WP-A rule. | 328 | 331 | "src/hwpx/opc/zip_records.py", | @@ -542,6 +545,9 @@ include = [ | 542 | 545 | "src/hwpx/oxml/caret.py", | 543 | 546 | # Moving and copying a table's rows (asks10d) -- born in the gate, per the WP-A rule. | 544 | 547 | "src/hwpx/oxml/table_rows.py", | | 548 | + # Line caches that outlived their paragraph's content: what a section watches and how a save or a | | 549 | + # table's structure edit judges it, moved out of section.py -- born in the gate, per the WP-A rule. | | 550 | + "src/hwpx/oxml/_line_caches.py", | 545 | 551 | # A save's ZIP records: read where each entry lies, write an archive from whole records, so an | 546 | 552 | # untouched part keeps its compressed bytes (exec7/zlib-bytes) -- born in the gate, per the WP-A rule. | 547 | 553 | "src/hwpx/opc/zip_records.py", | |
|