The performance of qwebengineview is really bad
-
It's the first time to post in the Qt official community, um! Bad Qt!
This is a local html file I opened directly in the chrome browser, and the loading event 1ms does not exceed 3ms at most.
Opening the same html in qt with qwebengineview setUrl takes 118ms, and the fastest takes 72ms.
The code is so simple that I don't even want to write it down
Qt version: 6.5.1
QWebEngineView *webView = new .... (this); webView->setUrl(QUrl(....... webView->show();
The performance is horribly poor.
Oh, by the way, if I don't say it, someone will definitely say that you must be in Debug mode.
What do you think? Why don't you try?Qt's optimization and support for QWebEngineView made me even doubt Qt's technical strength.
And try to use it with QStackedWidget, you will find that Qt will give you a surprise
hahaha
interesting product.As far as the current situation is concerned, Qt company is still crazy about promoting their commercial version. Just last week, they contacted our team leader, please, don’t keep thinking about making money, just this kind of performance? Is it worth buying the commercial version?
-
It's the first time to post in the Qt official community, um! Bad Qt!
This is a local html file I opened directly in the chrome browser, and the loading event 1ms does not exceed 3ms at most.
Opening the same html in qt with qwebengineview setUrl takes 118ms, and the fastest takes 72ms.
The code is so simple that I don't even want to write it down
Qt version: 6.5.1
QWebEngineView *webView = new .... (this); webView->setUrl(QUrl(....... webView->show();
The performance is horribly poor.
Oh, by the way, if I don't say it, someone will definitely say that you must be in Debug mode.
What do you think? Why don't you try?Qt's optimization and support for QWebEngineView made me even doubt Qt's technical strength.
And try to use it with QStackedWidget, you will find that Qt will give you a surprise
hahaha
interesting product.As far as the current situation is concerned, Qt company is still crazy about promoting their commercial version. Just last week, they contacted our team leader, please, don’t keep thinking about making money, just this kind of performance? Is it worth buying the commercial version?
@alvazz It's always nice to back up your findings with more detail. Otherwise it sounds like random ranting.
What platform are you on?
Which Qt version are you using?
What is the content of that test file?
How are you measuring it?Can you provide a short complete example with the test data and methodology where you see the issue?
someone will definitely say that you must be in Debug mode.
What do you think? Why don't you try?So I did.
Windows 11
Stock Qt 6.5.1 from online installer
Test html file from here
Google Chrome 114.0.5735.110
Measured using Chrome performance tools and QtWebEngine debugging.I've run 20 consecutive reloads for each. The average is about 4ms for both. I don't see the issue you're describing.
And try to use it with QStackedWidget, you will find that Qt will give you a surprise
Could you be more specific? Works fine for me.
Are you sure you're measuring the right thing? The code you've shown has little to do with measuring web view performance. Maybe you're measuring web engine initial startup when first showing the widget? That would indeed take a bit time, but it's comparable to the startup time of a web browser. -
@alvazz It's always nice to back up your findings with more detail. Otherwise it sounds like random ranting.
What platform are you on?
Which Qt version are you using?
What is the content of that test file?
How are you measuring it?Can you provide a short complete example with the test data and methodology where you see the issue?
someone will definitely say that you must be in Debug mode.
What do you think? Why don't you try?So I did.
Windows 11
Stock Qt 6.5.1 from online installer
Test html file from here
Google Chrome 114.0.5735.110
Measured using Chrome performance tools and QtWebEngine debugging.I've run 20 consecutive reloads for each. The average is about 4ms for both. I don't see the issue you're describing.
And try to use it with QStackedWidget, you will find that Qt will give you a surprise
Could you be more specific? Works fine for me.
Are you sure you're measuring the right thing? The code you've shown has little to do with measuring web view performance. Maybe you're measuring web engine initial startup when first showing the widget? That would indeed take a bit time, but it's comparable to the startup time of a web browser.First of all, I didn't complain, I just found it incredible. Of course, the words I published may make people feel complained, but this is not the case. I just think that this kind of low-level problem appears in a so-called top-level framework like Qt. It's a pity, and these problems are very common problems. I even doubt that the Qt team has no test group? Or the Qt team's strategy is to just release the version, then throw it out, wait for feedback from community users, and then make a fix? Even, is it true that the Qt internal team does not even conduct the most basic tests?
Some people may think that I am just talking about it.
OK, then I will put a minimal demo to see this ridiculous effect.
https://drive.google.com/file/d/17icOtkcrnfggdDOBePOwtUq2-aH2hxAU/view?usp=sharing
You are very brave, I hope this post will not be deleted and we can keep the conversation going and I will give you more and more, ridiculous and mind-boggling bugs.
Oh, I seem to have forgotten something.
As you requested, I report to you on my development environment:
OS: Windows 11
CPU: i9-13900kf
RAM: 128G
IDE: VS2022
Qt: 6.5.1 (Office Online Tool install) -
First of all, I didn't complain, I just found it incredible. Of course, the words I published may make people feel complained, but this is not the case. I just think that this kind of low-level problem appears in a so-called top-level framework like Qt. It's a pity, and these problems are very common problems. I even doubt that the Qt team has no test group? Or the Qt team's strategy is to just release the version, then throw it out, wait for feedback from community users, and then make a fix? Even, is it true that the Qt internal team does not even conduct the most basic tests?
Some people may think that I am just talking about it.
OK, then I will put a minimal demo to see this ridiculous effect.
https://drive.google.com/file/d/17icOtkcrnfggdDOBePOwtUq2-aH2hxAU/view?usp=sharing
You are very brave, I hope this post will not be deleted and we can keep the conversation going and I will give you more and more, ridiculous and mind-boggling bugs.
Oh, I seem to have forgotten something.
As you requested, I report to you on my development environment:
OS: Windows 11
CPU: i9-13900kf
RAM: 128G
IDE: VS2022
Qt: 6.5.1 (Office Online Tool install)@alvazz said in The performance of qwebengineview is really bad:
I even doubt that the Qt team has no test group?
Even, is it true that the Qt internal team does not even conduct the most basic tests?
It is these kinds of comments which are just silly. Of course Qt is thoroughly tested. Just because you are having some issue or have spotted some problem does not mean otherwise.
@Chris-Kawa does not seem to report the same results as you, and has made some suggestions.
-
@alvazz said in The performance of qwebengineview is really bad:
I even doubt that the Qt team has no test group?
Even, is it true that the Qt internal team does not even conduct the most basic tests?
It is these kinds of comments which are just silly. Of course Qt is thoroughly tested. Just because you are having some issue or have spotted some problem does not mean otherwise.
@Chris-Kawa does not seem to report the same results as you, and has made some suggestions.
@JonB It is normal for bugs to exist in any software, but is it necessary for bugs that are too simple to exist?
Don't think about making money from users all day long, just make the product well first.If a top-level product cannot even accept criticism from users, and in turn accuses users of being stupid, I believe that this product must not be truly powerful
-
@JonB It is normal for bugs to exist in any software, but is it necessary for bugs that are too simple to exist?
Don't think about making money from users all day long, just make the product well first.If a top-level product cannot even accept criticism from users, and in turn accuses users of being stupid, I believe that this product must not be truly powerful
@alvazz
Nobody has accused you of being "stupid" --- where has anyone said that?I believe that this product must not be truly powerful
That is entirely up to you.
By the way, are you aware that is a forum of Qt users, just like yourself. This is not The Qt Company's forum. Since you say about " making money from users all day long" I guess you must have the paid commercial version, not the free open source one, so you can get support and complain about the speed directly to TQtC.
If I were you I would wonder why my test times are different from @Chris-Kawa's, if you are really interested in a solution.
Also, I certainly accept that ~100ms is much slower than 1ms and would want to investigate that in your case. But I am interested to know why even if you could not improve it (which hopefully you can) you are quite so bothered about loading a page taking 1/10th of a second? Do you find you can read the page much quicker than in a tenth of a second?
Finally, QtWebEngine is a "wrapper" around Google's Chromium engine. It is possible whatever delay is in that engine rather than in QtWebEngine, so it wouldn't actually be a Qt issue. Have you considered this possibility? Maybe it is Google's chromium which is an untested, non-powerful product and you want to steer clear of?
-
First of all, I didn't complain, I just found it incredible. Of course, the words I published may make people feel complained, but this is not the case. I just think that this kind of low-level problem appears in a so-called top-level framework like Qt. It's a pity, and these problems are very common problems. I even doubt that the Qt team has no test group? Or the Qt team's strategy is to just release the version, then throw it out, wait for feedback from community users, and then make a fix? Even, is it true that the Qt internal team does not even conduct the most basic tests?
Some people may think that I am just talking about it.
OK, then I will put a minimal demo to see this ridiculous effect.
https://drive.google.com/file/d/17icOtkcrnfggdDOBePOwtUq2-aH2hxAU/view?usp=sharing
You are very brave, I hope this post will not be deleted and we can keep the conversation going and I will give you more and more, ridiculous and mind-boggling bugs.
Oh, I seem to have forgotten something.
As you requested, I report to you on my development environment:
OS: Windows 11
CPU: i9-13900kf
RAM: 128G
IDE: VS2022
Qt: 6.5.1 (Office Online Tool install)@alvazz Calm down. First of all we're not working for Qt Company, so I don't know what you're going about.
Second, you're more than welcome to criticize. No need to be so defensive.
Third - learn about Qt development process before you go on about it not being tested, because you're clearly clueless here.
All I'm saying is just be thorough when you make such claims, because as of now they are unsubstantiated. Nothing you posted suggests that you're even measuring the same things. Looking at the code it seems you dynamically create a new web engine widget every time you want to show a page. Of course that's going to be slow. It' s like opening a web browser every time. If it's in the range of 118ms like you mentioned I'd said that's pretty good. That's not the same thing as just measuring page load time in a browser. It's like measuring opening a browser and then loading a page.
Here are my results when using your code comparing the actual page loads, not creating widgets:
Chrome:
Your code using a remote profiling:
If you look at the numbers in the lower right corner they are pretty much within margin of error of each other and, as I mentioned before, fluctuate a bit on reloads, but stay around 4ms.
-
@alvazz Calm down. First of all we're not working for Qt Company, so I don't know what you're going about.
Second, you're more than welcome to criticize. No need to be so defensive.
Third - learn about Qt development process before you go on about it not being tested, because you're clearly clueless here.
All I'm saying is just be thorough when you make such claims, because as of now they are unsubstantiated. Nothing you posted suggests that you're even measuring the same things. Looking at the code it seems you dynamically create a new web engine widget every time you want to show a page. Of course that's going to be slow. It' s like opening a web browser every time. If it's in the range of 118ms like you mentioned I'd said that's pretty good. That's not the same thing as just measuring page load time in a browser. It's like measuring opening a browser and then loading a page.
Here are my results when using your code comparing the actual page loads, not creating widgets:
Chrome:
Your code using a remote profiling:
If you look at the numbers in the lower right corner they are pretty much within margin of error of each other and, as I mentioned before, fluctuate a bit on reloads, but stay around 4ms.
@Chris-Kawa
OK, I will change a computer, and then the same test again, and then publish the results, but do you think because it is dynamically created webengineview, so the window should respond to the effect like close/reopen? -
@Chris-Kawa
OK, I will change a computer, and then the same test again, and then publish the results, but do you think because it is dynamically created webengineview, so the window should respond to the effect like close/reopen?@alvazz You still haven't said what and how you're measuring.
Creating a web engine view is a heavy task. It spins up entire chromium and javascript engines. It also changes rendering backend from software based widgets to hardware accelerated chromium surface.
If you're planning on switching to and from it a lot then you should create it once and just show/hide, not recreate every time you want to show new page, because yes, that's going to be slow like closing and re-opening a browser.