It turns out DBus is event slower than expected. Using GSockets API we can simplify the code and make it a lot more efficient. This will drastically reduce the time to run WebDriver tests in the bots.
Created attachment 384141 [details]
Will it be protocol-compatible with generic implementation in inspector/remote/socket?
Comment on attachment 384141 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=384141&action=review
> + memmove(m_readBuffer.data(), m_readBuffer.data() + messageSize, m_readBuffer.size() - messageSize);
This could be std::memmove().
> + memmove(m_writeBuffer.data(), m_writeBuffer.data() + bytesWritten, m_writeBuffer.size() - bytesWritten);
And this too.
(In reply to Konstantin Tokarev from comment #2)
> Will it be protocol-compatible with generic implementation in
No, the message format is different.
Committed r252770: <https://trac.webkit.org/changeset/252770>
(In reply to Carlos Garcia Campos from comment #4)
> (In reply to Konstantin Tokarev from comment #2)
> > Will it be protocol-compatible with generic implementation in
> > inspector/remote/socket?
> No, the message format is different.
How can we address this? It's really wasteful and unfortunate to have GTK/WPE move from DBus to sockets only to use a different implementation from the one that's meant for generic use. Basuke has had the socket-based inspector working downstream on GTK port for a long time, it just was higher-priority for us to get the WinCairo / PlayStation parts upstreamed first. Hopefully we can work together to realize a common solution.
We want to keep using GVariant for the message parameters, it's a lot more convenient when sending complex data, and probably more efficient too.