You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to inline many HTML documents, you can utilize `inline_many` that processes the input in parallel.
85
+
When there is a need to inline multiple HTML documents simultaneously, `css_inline` offers the `inline_many` function.
86
+
This feature allows for concurrent processing of several inputs, significantly improving performance when dealing with a large number of documents.
86
87
87
88
```python
88
89
import css_inline
89
90
90
91
css_inline.inline_many(["<...>", "<...>"])
91
92
```
92
93
93
-
`inline_many` will spawn threads on the Rust level; thus, you can expect it's running faster than `css_inline.inline` via Python's `multiprocessing` or `threading` modules.
94
+
Under the hood, `inline_many`, spawns threads at the Rust layer to handle the parallel processing of inputs.
95
+
This results in faster execution times compared to employing parallel processing techniques at the Python level.
96
+
97
+
**Note**: To fully benefit from `inline_many`, you should run your application on a multicore machine.
0 commit comments