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
Most Tab methods needs to do multiple calls to the browser so they last for 200ms to 600ms.
dispatch_incoming_messages should not keep the lock while it has nothing to read.
Changing READ_TIMEOUT_DURATION from 100ms to 1ms make Element::click run in 50ms instead of 500ms. I do not submit a PR because I'm not sure that it's good to do that.
According to snapview/tungstenite-rs#378 it would also be possible to use non blocking socket but again I'm not sure it's good.
A not disruptive and easy change would be to let the user change the READ_TIMEOUT_DURATION value.
The text was updated successfully, but these errors were encountered:
Sending a message to the browser always takes 100ms. This is because this lock:
https://github.com/rust-headless-chrome/rust-headless-chrome/blob/v1.0.8/src/browser/transport/web_socket_connection.rs#L162
is always waiting for this lock:
https://github.com/rust-headless-chrome/rust-headless-chrome/blob/v1.0.8/src/browser/transport/web_socket_connection.rs#L80
which almost always last for 100ms because of:
https://github.com/rust-headless-chrome/rust-headless-chrome/blob/v1.0.8/src/browser/transport/web_socket_connection.rs#L153
Most Tab methods needs to do multiple calls to the browser so they last for 200ms to 600ms.
dispatch_incoming_messages
should not keep the lock while it has nothing to read.Changing
READ_TIMEOUT_DURATION
from 100ms to 1ms makeElement::click
run in 50ms instead of 500ms. I do not submit a PR because I'm not sure that it's good to do that.According to snapview/tungstenite-rs#378 it would also be possible to use non blocking socket but again I'm not sure it's good.
A not disruptive and easy change would be to let the user change the
READ_TIMEOUT_DURATION
value.The text was updated successfully, but these errors were encountered: