Skip to content

Commit 0d61dd4

Browse files
committed
docs: Update wording
1 parent 894b3e8 commit 0d61dd4

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

bindings/python/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,19 @@ inlined = css_inline.inline(HTML)
8282
# </html>
8383
```
8484

85-
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.
8687

8788
```python
8889
import css_inline
8990

9091
css_inline.inline_many(["<...>", "<...>"])
9192
```
9293

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.
9498

9599
### Configuration
96100

bindings/ruby/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,20 @@ puts inlined
6363
# Outputs: "<html><head></head><body><h1 style=\"color:blue;\">Big Text</h1></body></html>"
6464
```
6565

66+
When there is a need to inline multiple HTML documents simultaneously, `css_inline` offers the `inline_many` function.
67+
This feature allows for concurrent processing of several inputs, significantly improving performance when dealing with a large number of documents.
68+
69+
```ruby
70+
require 'css_inline'
71+
72+
inlined = CSSInline.inline_many(["...", "..."])
73+
```
74+
75+
Under the hood, `inline_many`, spawns threads at the Rust layer to handle the parallel processing of inputs.
76+
This results in faster execution times compared to employing parallel processing techniques at the Ruby level.
77+
78+
**Note**: To fully benefit from `inline_many`, you should run your application on a multicore machine.
79+
6680
## Configuration
6781

6882
For customization options use the `CSSInliner` class:

0 commit comments

Comments
 (0)