QtWebkit 4.8 performance
-
Hi all,
me and my team are making a webcam/kinect game. We are doing all of our image processing in native app and the rest (graphics and game engine) in JS canvas and html. Maybe some day, we will move image processing also to JS and our game will be completely web based.But now we are using QtWebkit to render our game and its performance is not as good as we would like. I checked using this test: http://www.smashcat.org/av/canvas_test/ that webkit performance (I used "fancybrowser" example) is really poor - 23 FPS compared to google chrome (around 120 FPS). I also checked that previous version of Qt (4.7.4) is much faster and runs at 40 FPS, but still it is not as fast as I would like it to be (I also need to do image processing in the background, and display camera image under the WebView). On the other hand images drawn on canvas in Qt 4.7 look terrible, when scaled so maybe that is the reason.
I tried to do all sorts of optimizations:
- profiling and optimizing JS (I can't do anything more about it, besides it only uses about 15% of process time according to webkit profiler)
- Using QGraphicsWebView instead of QWebView - it is a few fps faster
- Using QGLWidget on QGraphicsView - it is much slower with high resolutions
- Tweaking all sorts of settings
Basically I know that current bottle neck is page rendering. Is there anything I can do about it? Why Qt 4.8 is much slower than Qt 4.7?
-
Try Qt5 if it's not too much a burden to port. Otherwise, you can consider using Google's NaCl.
-
Unfortunately, porting to Qt5 would be really hard, since right now we are using python and PySide for our native code. I checked that PySide does not have (much) impact on performance.
-
I see. Sadly, I can't help much more, I don't use QtWebKit myself. Powodzenia :D
-
I did, and as I wrote earlier, performance is not as good as QT 4.7
We will probably use "CEF":http://code.google.com/p/chromiumembedded/ to get better performance.
-
But see here I'm using Qt 4.8 and I'm getting a little bit better performances. "Link":https://dl.dropbox.com/u/55262925/Html5.png