Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Performance issues with detached QProcess
Qt 6.11 is out! See what's new in the release blog

Performance issues with detached QProcess

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    boboisaman
    wrote on last edited by
    #1

    Hi everyone,

    I've built an interface in Qt which interacts with a camera and a projector for synchronized image capture. I am using a button linked to a QProcess command on the interface to launch an external process which sends images to the projector to trigger image capture.

    The issue is that, when I launch the process from this interface, the OpenGL instance created by the external process suffers greatly in performance, resulting in botched image captures. Such a performance drop is not experienced when running the process by itself. The only thing that I think might affect the new process is the 2 OpenGL instances running in the interface, but the external process itself does not do much processing at all: it just draws a square, binds a PNG image onto the surface, and refreshes at 60 Hz for all images.

    I was wondering if this is an issue with the way I have launched the program, or if its due to hardware limitations (the workstation does not have the highest specs. Thanks in advance! My launching code is included below:

    @ bool bStartSuccess;
    QString sProgram = CASIO_EXE_PATH;
    QString sProgramDir = CASIO_EXE_DIR;
    QStringList arguments;
    arguments << QString("%1").arg(pattern_list.count());
    QString sOldPath = QDir::currentPath();
    QDir::setCurrent( sProgramDir );
    QProcess *process = new QProcess(this);
    bStartSuccess = process->startDetached(sProgram, arguments);
    QDir::setCurrent(sOldPath);
    @

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Moderators Qt Champions 2024 Qt Champions 2022 Qt Champions 2017
      wrote on last edited by
      #2

      I don't suspect issue with process creation. Can you try with process->start API and QProcess::exec methods as well. Is it on Linux or Windows ?

      Dheerendra
      @Community Service
      Certified Qt Specialist
      https://www.pthinks.com

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved