Qt World Summit: Submit your Presentation

QWebView vs QWebEngineView Javascript performance.

  • Hey there!
    A little background first:
    I provide a proxy service for gaming that aims to reduce latency (similar to WTFast and Lowerping if you ever heard about). Currently, my customers pay a monthly fee, but considering the boom in crypto-currencies, I was considering launching a new pilot where the customer, instead of paying a monthly fee, would donate a bit of CPU processing to mine some kind of virtual coin.

    Since I coded my client using Qt and it has an embedded QWebView, my first idea was to use https://coinhive.com, as it provides a nice JavaScript framework to farm the Monero crypto-currency using a web browser. However, the performance is awful when running inside the QWebView.

    As an example, if I open the page with the javascript on chrome I get around 60 hashes per second using around 20% of my CPU. When I open the same page inside the QWebView, I get 1~2 hashes per second using the same 20% of my CPU.

    I'm really new to coding overall and I was wondering if this is something that could be improved using QWebEngineView instead. Anyone has any idea? I'm asking before testing because I'm having some trouble getting MSVC to work and from what I've seen that is needed to use QWebEngine on windows (as I said, I'm a newbie...).

    I'd really appreciate any input. Thanks!

  • Anyone has any idea?