perf(core): один zip-проход нормализации — быстрее и меньше транзиентной памяти #63

Merged
pjandro merged 1 commits from perf/docx-rewrite-pipeline into main 2026-10-27 01:12:44 +03:00
Collaborator
No description provided.
ai added 1 commit 2026-10-27 01:10:34 +03:00
perf(core): один zip-проход нормализации XML-частей вместо шести
PR checks / web (pull_request) Successful in 41s
PR checks / java (pull_request) Successful in 1m5s
Main: tests, deploy, autotests / web (push) Successful in 31s
Main: tests, deploy, autotests / images-web (push) Successful in 29s
Main: tests, deploy, autotests / java (push) Successful in 1m27s
Main: tests, deploy, autotests / images-app (push) Successful in 41s
Main: tests, deploy, autotests / deploy (push) Successful in 3m14s
Main: tests, deploy, autotests / autotests (push) Failing after 2m6s
Main: tests, deploy, autotests / rollback (push) Successful in 3m10s
1f37931f86
DocxRewritePipeline применяет рерайты Strict→OnOff→Symbol→Field→Invisible→
GlyphCoverage к каждой записи word/*.xml за один проход zip; неизменённые
записи (медиа, rels) переносятся raw-копией сжатых байтов без inflate/deflate.
OleObjectNormalizer — два этапа: дешёвый детект по центральному каталогу
(читаются только [Content_Types].xml и word/*.xml), переупаковка только при
находке. PDF-буфер предразмеряется; нормализованная копия байтов перестаёт
читаться до FOP-рендера. Вывод на 13 фикстурах идентичен (текст + картинки),
531 тест без правок. Индивидуальные normalize() шести нормализаторов
сохранены (контракт юнит-тестов), в цепочке больше не вызываются.

Покрытие (JaCoCo)

Модуль Строки Ветви Порог строк
wordpdf-core 94.5% 85.2% 90%
wordpdf-app 93.4% 84.2% 90%
<!-- jacoco-coverage --> ## Покрытие (JaCoCo) | Модуль | Строки | Ветви | Порог строк | |---|---|---|---| | wordpdf-core | 94.5% | 85.2% | 90% | | wordpdf-app | 93.4% | 84.2% | 90% |
pjandro merged commit 1f37931f86 into main 2026-10-27 01:12:44 +03:00
pjandro deleted branch perf/docx-rewrite-pipeline 2026-10-27 01:12:44 +03:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: pjandro/java-word-pdf#63