Skip to content
  • 0 Votes
    5 Posts
    234 Views
    letsfindawayL

    @Pl45m4 Here is a short video of the application showing the issue:
    https://github.com/letsfindaway/OpenBoard/issues/203#issuecomment-2595705681

    The rubber is a pixmap cursor using QCursor. The circle is repositioned at each mouseMoveEvent. You see that it is lagging behind the cursor. The preview image to the left is the second view attached to the same scene.

    So you see, nothing complicated. And as I already said in the beginning: when I run the same program using Qt5, then the lag is much smaller, because the repetition rate of the mouseMoveEvents is higher.

    I have setMouseTracking(true), so that I get the events even when the mouse button is not pressed.

    And no, there are no further actions connected to the movement as long as the mouse button is not pressed.

  • 0 Votes
    10 Posts
    680 Views
    B

    @JonB It appears the problem was in my testing after updating the latest code here (Also it was always 10,000 data points, I wrongly wrote it as 1000.. I over-worked this issue. I will mak an edit. ). CPU usage has come down to 18% from 60%. I had done following things-

    Moved LineSeries update to backend

    LineSeres clear + append is replaced with replace

    Qt is upgraded to 6.8.0

    I am not sure which one out of this helped but results look better now. Thank you so much everyone who spent their efforts to read my long question and provide amazing ideas. Appreciate it.

  • 0 Votes
    8 Posts
    577 Views
    Axel SpoerlA

    There is nothing general in the docs, that would say: This is faster, because….
    Qt 6 follows a general trend: Use more caching for the sake of speed. There were some optimisations in container classes and string views. We fixed a mem leak in the Quick pixmap cache.

    The downside of more caching, in other words higher memory consumption, is that older memory constrained setups (mainly embedded) need to swap out and actually become slower.

    But I guess that’s not a Qt specific phenomenon. All frameworks and other tools I use on a daily basis, have increased their appetite for memory as RAM becomes cheaper and larger.

  • 0 Votes
    2 Posts
    364 Views
    globG

    I've submitted a Qt bug report for this:

    https://bugreports.qt.io/browse/QTBUG-119614
    "SSL initialization is around 10 to 100 times slower in Qt 6"

  • 0 Votes
    5 Posts
    608 Views
    H

    Just changing the root widget of my application from QWidget to QQuickWidget fixed the problem. Well, that was way easier than I expected! Thanks for the help.

  • 0 Votes
    3 Posts
    382 Views
    C

    @MEsc said in Accessing value of vector only once:

    I have another function MainWindow::on_start_clicked()
    When this Function get called (here via button),
    values should load in vec.
    QVector<QString> vec = loadfrom();

    That looks like vec is a variable local to the slot attached to the button. You load it and then it is destroyed when the slot exits. If you want the vec object to have a longer lifetime then you need to arrange that. As @Christian-Ehrlicher says, making vec a private member variable of the MainWindow class is probably the right approach. So,

    class MainWindow: public QMainWindow { ... private: QVector<QString> m_vec }; void MainWindow::on_start_clicked() { ... m_vec = loadfrom(); ... } void MainWindow::on_answer_returned() { ... // do stuff with m_vec ... }

    This is basic C++ knowledge and not Qt specific.

  • 7 Votes
    1 Posts
    300 Views
    No one has replied
  • 0 Votes
    7 Posts
    865 Views
    G

    @sierdzio

    Ok now it's much clearer, thank you again.

    It looks like there is a lot of documentation to read, but apparently most things I have in mind should work. Still, for some reason, I feel QWidgets will perform faster. I'll try to make some tests and get back here.

    Thank you again!

  • 0 Votes
    1 Posts
    313 Views
    No one has replied
  • 1 Votes
    1 Posts
    496 Views
    No one has replied
  • 0 Votes
    24 Posts
    6k Views
    J.HilkJ

    @KaoN
    mmh the last Idea I have, would be updating your graphics drivers, those are most often an issue. After that, bring it to https://bugreports.qt.io

  • 0 Votes
    6 Posts
    731 Views
    L

    Hi,
    @SGaist
    @Kent-Dorfman

    I tried to google "QUdpsocket priority",
    I got many result that discribe my problem but without soultion.

    Many peopele have the same problem.

    My felling is there is some problem. But i dont have enough knowledge to debug it.

  • 0 Votes
    1 Posts
    388 Views
    No one has replied
  • 0 Votes
    3 Posts
    2k Views
    M

    Thanks, so that is what "OpenGL-based composing" does under the hood!

    Is there any way to synchronize/batch my QGraphicsView updates, so that there is less of a performance impact?
    Or would it be preferable to switch the QGraphicsView-based widgets over to render their scene via OpenGL?

  • 0 Votes
    7 Posts
    1k Views
    D

    @kent-dorfman Thanks and will try out those methods also.

  • 0 Votes
    20 Posts
    3k Views
    K

    @kumararajas said in QWebView - On Click CPU Performance:

    Thank you @Konstantin-Tokarev This explanation means a lot. This helps us to understand that we are using older version of Qt WebKit and which is not really efficient.
    At this moment of time, we don't have a plan to update to the latest version. We will have to find a work around in the application to manage the situation.

    Does it mean that you cannot change any bits of software in your system and you are limited to workarounds on the side of web page? If so, it's really sad situation.

    If you are able to change software, you are strongly adviced to use QtWebKit 2.3.4, or at least give it a try.

    @kumararajas said in QWebView - On Click CPU Performance:

    @Konstantin-Tokarev Yes, we have been trying to understand who consumes the lot of CPU and why. When I did profiling using gprof/perf tools, I can find out that which function in my application consumes a lot, but that does not root in to the framework, which is webkit. Do you recommend any method which I can profile the framework side as well?

    Don't use gprof. This tool claims to measure time spent in functions, but in fact measures totally different thing. And, as you've already discovered, it can only profile code which was rebuilt with -pg flag.

    As for perf, it is decent tool. On older systems oprofile can be used. Make sure that your QtWebKit library is not stripped

    And even if we find issues in the framework, at this moment we are not in a position to upgrade the system. So we will identify the work around and live with it ( Already found couple of work around solution, which I will be sharing it in a while here )

    I have no idea what do you mean here, and I don't really want to be in your shoes. (/me once had to reverse engineer and then binary patch 3rd party kernel driver with no source code, but at least there were no problems with updating target system)

    Reason for asking such question is,
    Someone might have faced similar problem and might have the ready solution. Instead of I spending lot of time in exploring, researching, debugging, etc, I could post it here to know if someone knows about it. However, in parallel to posting this question, I have been doing things in parallel if in case I don't get the answer. For this post, you being a legend on webkit, you have mentioned that it could be a problem of webkit version that we use, which makes sense and unveils the root cause.

    I'm far from being legend, and there may be other reasons of high CPU consumptions, maybe several factors at once. It can be that WebKit just doesn't have enough memory to process page, and system is thrashing (you'll see high sys usage in top then).

    When I touch the report, does Qt Web Kit renders the whole web page again?

    If you are not using QWebSettings::TiledBackingStoreEnabled and are not using accelerated composting on QGLWidget viewport, and are not using QWebPage::setPreferredContentsSize, then QtWebKit definitely reners whole page again after scroll. It doesn't redraw old pixel, but it performs whole rendering procedure with QPainter being clipped to update region. It may easily be a bottleneck if page is complex

  • 0 Votes
    6 Posts
    3k Views
    J

    @J.Hilk Thank you for your input!

    I will give it a try and come back on this forum if stuck ;)
    Cheers,

  • 0 Votes
    5 Posts
    1k Views
    W

    @SGaist said in HTTPS POST performance:

    Hi and welcome to devnet,

    @wrekler said in HTTPS POST performance:

    How relevant is knowing the server?

    It is relevant because:

    It might be sleeping if for example it's an heroku free tier that hasn't been used for some times. Therefore the first query will have to wait for the server to awaken thus it will be longer. It might require authentication which takes some time on first query to setup and allow to process. It might need to query some slow to start resource to answer your question etc.

    Oh, I see. Well it is not a my server, it is a thirdy party server, so I can't answer to all that question. All I know is:

    It is hosted on akamai.com Acqtually it require some authentication data that I give with POST data

    So I think I can't optimize requests server side, all can I do is caching DNS/TCP/SSL requests but I don't know if Qt 5.11.2 actually implements all that suggestions