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
Currently, our Rust crate resolves remote stylesheets in a sequential and blocking manner. This means that one has to wait for each stylesheet to be fully downloaded before moving on to the next one. This approach is inefficient, especially when handling multiple stylesheets, leading to longer wait times and a suboptimal user experience.
Why this is Important
The ability to resolve multiple stylesheets concurrently can significantly speed up the process, leading to faster loading times and a better user experience. Additionally, offering a blocking API can make the crate easier to use in certain scenarios where synchronous operations are preferred or required.
Things to be aware of
The first step would be to factor out resolving code a bit
It could be AsyncCssInliner, that has inline & inline_to as async functions + top-level API could be something like in reqwest - css_inline::blocking::inline and css_inline::inline being an async function.
It is nice to have async support in bindings (Python at least), but not necessary in the same PR
reqwest might be a good alternative to attohttpc we use now.
The text was updated successfully, but these errors were encountered:
Problem
Currently, our Rust crate resolves remote stylesheets in a sequential and blocking manner. This means that one has to wait for each stylesheet to be fully downloaded before moving on to the next one. This approach is inefficient, especially when handling multiple stylesheets, leading to longer wait times and a suboptimal user experience.
Why this is Important
The ability to resolve multiple stylesheets concurrently can significantly speed up the process, leading to faster loading times and a better user experience. Additionally, offering a blocking API can make the crate easier to use in certain scenarios where synchronous operations are preferred or required.
Things to be aware of
AsyncCssInliner
, that hasinline
&inline_to
as async functions + top-level API could be something like inreqwest
-css_inline::blocking::inline
andcss_inline::inline
being an async function.reqwest
might be a good alternative toattohttpc
we use now.The text was updated successfully, but these errors were encountered: