Results 1 to 10 of 10

Thread: Why qt execution is so slow,this is a test

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanked 342 Times in 324 Posts

    Default Re: Why qt execution is so slow,this is a test

    You want to enhance the performance of appending 1000000 characters to a string ? Simple answer would be - don't do it this way. Use QString::reserve to preallocate the string buffer and then insert characters into given position, this should work faster.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: Why qt execution is so slow,this is a test

    ...or use QByteArray which shouldn't have all the UTF-8 overhead.

  3. #3
    Join Date
    Feb 2012
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Why qt execution is so slow,this is a test

    thanks,i think i know that is where the problem,the string will be converted to unicode

  4. #4
    Join Date
    Sep 2011
    Posts
    1,241
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3
    Thanked 127 Times in 126 Posts

    Default Re: Why qt execution is so slow,this is a test

    Reading the docs was helpful? No way! They are just there to look pretty.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. Lib not found in execution.
    By Netich in forum Installation and Deployment
    Replies: 6
    Last Post: 30th October 2009, 14:28
  2. RunTime Execution
    By hasnatzaidi in forum Newbie
    Replies: 3
    Last Post: 5th October 2009, 06:45
  3. execution in QT
    By adamatic in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2009, 08:12
  4. Execution error
    By Shuchi Agrawal in forum Installation and Deployment
    Replies: 10
    Last Post: 9th February 2007, 12:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.