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. Slow work in Qt Creator

Slow work in Qt Creator

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.4k 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.
  • UndeadBlowU Offline
    UndeadBlowU Offline
    UndeadBlow
    wrote on last edited by
    #1

    Hi guys. I'm in strange situation, when I'm execute this trivial test code in Qt Creator (using non static release build Qt 4.8):
    @#include <QCoreApplication>
    #include <QtCore>
    #include <QDebug>
    #include <QTime>

    int main(int argc, char *argv[])
    {
    QCoreApplication a(argc, argv);

    int times = 3;
    int len = 500;
    int kmer = 9;
    
    QFile file&#40;"D:\\one.txt"&#41;;
    file.open(QIODevice::ReadOnly&#41;;
    
    QString strand = file.readLine(&#41;;
    strand.remove("\n"&#41;;
    
    QSet<QString> answersKmers;
    QString nextKmer;
    qDebug(&#41; << "Start";
    QTime timer;
    timer.start();
    for(int i = 0; i < strand.size() - kmer + 1; ++i)
    {
        nextKmer = strand.mid(i ,  kmer);
    
        if(!answersKmers.contains(nextKmer))
        {
            if(strand.mid(i,  len).count(nextKmer) >= times)
                answersKmers.insert(nextKmer);
        }
    }
    qDebug() << QString("End in %1 seconds").arg(timer.elapsed() / 1000);
    
    qDebug() << "9-mers form (500,3)-clumps in the E. coli genome: " << answersKmers.size();
    
    return a.exec(&#41;;
    

    }
    @
    it's works many minutes, but if execute .exe file of this program from explorer, it will works 4 seconds. I can't understand why! At my friend PC its works good even in Creator. What's the problem it can be?

    P.S. On my netbook with Debian it works in Creator fine too.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      When running from explorer did you first follow the "windows development guide":http://qt-project.org/doc/qt-4.8/deployment-windows.html ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • UndeadBlowU Offline
        UndeadBlowU Offline
        UndeadBlow
        wrote on last edited by
        #3

        [quote author="SGaist" date="1382817656"]Hi,

        When running from explorer did you first follow the "windows development guide":http://qt-project.org/doc/qt-4.8/deployment-windows.html ?[/quote]
        When running from explorer, I'm just double click and all fine :)
        In Creator if running from F5 (debugger) it will be so slow (minutes instead of seconds), but if push CTRL+R (just run) everything will be ok. This I have described release mode. I can't understand what with debagger - on netbook with Debian all ok from F5.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          It can depend on several things, the debugger you are using, the number of libraries you are using etc...

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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