@office-open/docx 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -13
- package/dist/index.d.mts +553 -504
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1954 -5435
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -6
package/README.md
CHANGED
|
@@ -82,27 +82,39 @@ Performance comparison against original `docx` (9.6.1) package (Windows 11 / Nod
|
|
|
82
82
|
|
|
83
83
|
| Scenario | @office-open/docx | docx | Speedup |
|
|
84
84
|
| ------------------------------------------------------- | ----------------: | ---------: | -------: |
|
|
85
|
-
| Simple document (2 paragraphs) |
|
|
86
|
-
| Styled paragraphs (20 paragraphs) |
|
|
87
|
-
| Table (10x5 cells) |
|
|
88
|
-
| Full featured (header/footer/headings/table/paragraphs) |
|
|
85
|
+
| Simple document (2 paragraphs) | 20.0K ops/s | 6.2K ops/s | **3.2x** |
|
|
86
|
+
| Styled paragraphs (20 paragraphs) | 11.4K ops/s | 4.6K ops/s | **2.5x** |
|
|
87
|
+
| Table (10x5 cells) | 10.1K ops/s | 3.7K ops/s | **2.7x** |
|
|
88
|
+
| Full featured (header/footer/headings/table/paragraphs) | 5.5K ops/s | 2.8K ops/s | **2.0x** |
|
|
89
89
|
|
|
90
90
|
**Create + toBuffer (end-to-end)**
|
|
91
91
|
|
|
92
|
+
Both libraries use DEFLATE compression.
|
|
93
|
+
|
|
92
94
|
| Scenario | @office-open/docx | docx | Speedup |
|
|
93
95
|
| ------------------------------------------------------- | ----------------: | --------: | -------: |
|
|
94
|
-
| Simple document (2 paragraphs) |
|
|
95
|
-
| Styled paragraphs (20 paragraphs) |
|
|
96
|
-
| Table (10x5 cells) |
|
|
97
|
-
| Full featured (header/footer/headings/table/paragraphs) |
|
|
96
|
+
| Simple document (2 paragraphs) | 388 ops/s | 194 ops/s | **2.0x** |
|
|
97
|
+
| Styled paragraphs (20 paragraphs) | 402 ops/s | 232 ops/s | **1.7x** |
|
|
98
|
+
| Table (10x5 cells) | 463 ops/s | 238 ops/s | **1.9x** |
|
|
99
|
+
| Full featured (header/footer/headings/table/paragraphs) | 346 ops/s | 179 ops/s | **1.9x** |
|
|
98
100
|
|
|
99
101
|
**Large Files — Create + toBuffer**
|
|
100
102
|
|
|
101
|
-
| Scenario
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
103
|
+
| Scenario | @office-open/docx | docx | Speedup |
|
|
104
|
+
| ---------------------------- | ----------------: | ---------: | -------: |
|
|
105
|
+
| 2000 paragraphs | 42.2 ops/s | 27.7 ops/s | **1.5x** |
|
|
106
|
+
| 200×10 table | 77.4 ops/s | 37.3 ops/s | **2.1x** |
|
|
107
|
+
| 20 sections × 100 paragraphs | 47.0 ops/s | 30.9 ops/s | **1.5x** |
|
|
108
|
+
|
|
109
|
+
**Large File (~100MB) — Mixed Content**
|
|
110
|
+
|
|
111
|
+
2000 paragraphs + 200 unique images (500KB each) + 100×10 table. Speedup is vs docx.
|
|
112
|
+
|
|
113
|
+
| Method | Speed | Speedup |
|
|
114
|
+
| ------------------------- | ---------: | -------: |
|
|
115
|
+
| @office-open/docx (sync) | 0.36 ops/s | 1.2x |
|
|
116
|
+
| @office-open/docx (async) | 0.40 ops/s | **1.3x** |
|
|
117
|
+
| docx | 0.30 ops/s | |
|
|
106
118
|
|
|
107
119
|
## License
|
|
108
120
|
|