Results 1 to 10 of 10

Thread: [PyQt4] QTreeView performance issue

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2012
    Posts
    14
    Qt products
    Platforms
    Windows

    Default [PyQt4] QTreeView performance issue

    Hi everyone,

    I've got a QTreeView with a custom model which has to handle several items (say 1 million). I've set the setUniformRowHeights property to True, so when the tree is set up the scrolling is very fluid. The problem arises when I try to change the ordering of the items.
    The following code illustrates the situation I have to deal with:

    Qt Code:
    1. from PyQt4.QtCore import *
    2. from PyQt4.QtGui import *
    3. from random import shuffle
    4. from time import clock
    5.  
    6. class TreeItem(object) :
    7. def __init__(self, data, parent=None) :
    8. self.parentItem = parent
    9. self.itemData = data
    10. self.childItems = []
    11.  
    12. def appendChild(self, item) :
    13. self.childItems.append(item)
    14.  
    15. def child(self, row) :
    16. return self.childItems[row]
    17.  
    18. def childCount(self) :
    19. return len(self.childItems)
    20.  
    21. def columnCount(self) :
    22. return len(self.itemData)
    23.  
    24. def data(self, column) :
    25. try :
    26. return self.itemData[column]
    27. except IndexError :
    28. return None
    29.  
    30. def parent(self) :
    31. return self.parentItem
    32.  
    33. def row(self) :
    34. if self.parentItem :
    35. return self.parentItem.childItems.index(self)
    36. return 0
    37.  
    38.  
    39. class TreeModel(QAbstractItemModel) :
    40. def __init__(self, ) :
    41. QAbstractItemModel.__init__(self)
    42.  
    43. self.root = TreeItem(("root",))
    44. self.fld = TreeItem(("Items",), self.root)
    45. self.root.appendChild(self.fld)
    46.  
    47. self.row_id = []
    48. for j in xrange(1000000) :
    49. self.row_id.append(j)
    50. self.fld.appendChild(TreeItem(("Item"+str(j+1),), self.fld))
    51. print "Done"
    52.  
    53. def _ItemFromIndex(self, index) :
    54. if not index.isValid() :
    55. return self.root
    56. item = index.internalPointer()
    57. if item == self.fld :
    58. return item
    59. fld_index = self.createIndex(0, 0, self.fld)
    60. return self.index(self.row_id[index.row()], 0, fld_index).internalPointer()
    61.  
    62. def columnCount(self, parent) :
    63. return 1
    64.  
    65. def data(self, index, role) :
    66. item = self._ItemFromIndex(index)
    67. if role == Qt.DisplayRole :
    68. return item.data(0)
    69.  
    70. def flags(self, flag) :
    71. return (Qt.ItemIsEnabled|Qt.ItemIsUserCheckable|Qt.ItemIsSelectable)
    72.  
    73. def hasChildren(self, parent=QModelIndex()) :
    74. if parent.column() > 0 :
    75. return False
    76. item = self.root if not parent.isValid() else parent.internalPointer()
    77. return item.childCount() != 0
    78.  
    79. def index(self, row, column, parent) :
    80. if not self.hasIndex(row, column, parent) :
    81. return QModelIndex()
    82.  
    83. parent = self.root if not parent.isValid() else parent.internalPointer()
    84. child = parent.child(row)
    85. return self.createIndex(row, column, child) if child else QModelIndex()
    86.  
    87. def parent(self, index):
    88. if not index.isValid() :
    89. return QModelIndex()
    90.  
    91. child = index.internalPointer()
    92. parent = child.parent()
    93.  
    94. if parent == self.root :
    95. return QModelIndex()
    96.  
    97. return self.createIndex(parent.row(), 0, parent)
    98.  
    99. def rowCount(self, parent=QModelIndex()) :
    100. if parent.column() > 0 :
    101. return 0
    102. item = self.root if not parent.isValid() else parent.internalPointer()
    103. return item.childCount()
    104.  
    105.  
    106. class Tree(QTreeView) :
    107. def __init__(self, parent, model) :
    108. QTreeView.__init__(self, parent)
    109. self.setHeaderHidden(True)
    110. self.setContextMenuPolicy(Qt.CustomContextMenu)
    111. self.setUniformRowHeights(True)
    112. self.setModel(model)
    113. self.expand(self.model().index(0, 0, QModelIndex()))
    114.  
    115. def Shuffle(self) :
    116. t1 = clock()
    117. shuffle(self.model().row_id)
    118. self.model().reset()
    119. self.expand(self.model().index(0, 0, QModelIndex()))
    120. print "Shuffle time:", clock()-t1
    121.  
    122. class Frame(QWidget) :
    123. def __init__(self, parent, model=None) :
    124. super(QWidget, self).__init__(parent)
    125.  
    126. self.tree = Tree(self, TreeModel())
    127. self.shuffle_btn = QPushButton("Shuffle")
    128. self.shuffle_btn.clicked.connect(self.tree.Shuffle)
    129.  
    130. vbox = QVBoxLayout()
    131. vbox.setContentsMargins(0, 0, 0, 0)
    132. vbox.addWidget(self.tree)
    133. vbox.addWidget(self.shuffle_btn)
    134. self.setLayout(vbox)
    135.  
    136. if __name__ == "__main__" :
    137. import sys
    138. a = QApplication(sys.argv)
    139.  
    140. dia = Frame(None)
    141. dia.resize(400, 600)
    142. dia.show()
    143. a.exec_()
    To copy to clipboard, switch view to plain text mode 

    I use the row_id list to map the items to be shown at a given index; I do this in order to use my own C-written sorting function to order the items. Now if you push the “Shuffle” button (which simulates the sorting) you can see that even if the execution time is fast (0.6 sec on my pc), the tree requires several seconds to be updated.
    Can anyone point me out what I am doing wrong? Thanks in advance!

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

    Default Re: [PyQt4] QTreeView performance issue

    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.

  3. #3
    Join Date
    Nov 2012
    Posts
    14
    Qt products
    Platforms
    Windows

    Default Re: [PyQt4] QTreeView performance issue

    Thanks for the suggestion, I ran cProfile and got the following output:

    62065498 function calls in 108.804 seconds

    Ordered by: internal time

    ncalls tottime percall cumtime percall filename:lineno(function)
    3002777 17.933 0.000 31.866 0.000 {built-in method hasIndex}
    1 14.911 14.911 39.792 39.792 {built-in method exec_}
    3002777 13.876 0.000 56.146 0.000 t.py:79(index)
    1 12.539 12.539 59.101 59.101 {built-in method show}
    3000042 7.782 0.000 13.924 0.000 t.py:73(hasChildren)
    3003126 7.145 0.000 13.124 0.000 t.py:99(rowCount)
    3006293 7.037 0.000 7.037 0.000 {built-in method createIndex}
    1 5.378 5.378 9.813 9.813 t.py:40(__init__)
    9009969 4.122 0.000 4.122 0.000 {built-in method isValid}
    1000002 3.553 0.000 3.553 0.000 t.py:7(__init__)
    6003168 3.471 0.000 4.688 0.000 t.py:18(childCount)
    6003168 3.186 0.000 3.186 0.000 {built-in method column}
    9011961 2.267 0.000 2.267 0.000 {built-in method internalPointer}
    3002777 1.238 0.000 1.238 0.000 t.py:15(child)
    6003169 1.216 0.000 1.216 0.000 {len}
    1 1.206 1.206 1.307 1.307 random.py:276(shuffle)
    3002788 0.811 0.000 0.811 0.000 t.py:62(columnCount)
    1000001 0.650 0.000 0.766 0.000 t.py:12(appendChild)
    2000002 0.232 0.000 0.232 0.000 {method 'append' of 'list' objects}
    999999 0.100 0.000 0.100 0.000 {method 'random' of '_random.Random' objects}
    1 0.077 0.077 108.804 108.804 t.py:1(<module>)
    2488 0.020 0.000 0.076 0.000 t.py:53(_ItemFromIndex)
    1 0.010 0.010 0.010 0.010 {nt.urandom}
    1536 0.009 0.000 0.017 0.000 t.py:87(parent)
    2488 0.007 0.000 0.084 0.000 t.py:65(data)
    1 0.007 0.007 0.007 0.007 {built-in method reset}
    1 0.004 0.004 0.017 0.017 random.py:40(<module>)
    1 0.003 0.003 0.003 0.003 t.py:107(__init__)
    1 0.003 0.003 0.003 0.003 hashlib.py:55(<module>)
    355 0.002 0.000 0.002 0.000 t.py:70(flags)
    1122 0.001 0.000 0.002 0.000 t.py:33(row)
    2394 0.001 0.000 0.001 0.000 {built-in method row}
    1122 0.001 0.000 0.001 0.000 {method 'index' of 'list' objects}
    1536 0.001 0.000 0.001 0.000 t.py:30(parent)
    1 0.001 0.001 1.314 1.314 t.py:115(Shuffle)
    1 0.000 0.000 9.817 9.817 t.py:123(__init__)
    355 0.000 0.000 0.000 0.000 t.py:24(data)
    1 0.000 0.000 0.000 0.000 {built-in method setModel}
    4 0.000 0.000 0.000 0.000 {built-in method model}
    1 0.000 0.000 0.000 0.000 {method 'connect' of 'PyQt4.QtCore.pyqtBoundSignal' o
    jects}
    1 0.000 0.000 0.000 0.000 {built-in method setLayout}
    1 0.000 0.000 0.000 0.000 __future__.py:48(<module>)
    1 0.000 0.000 0.010 0.010 random.py:100(seed)
    6 0.000 0.000 0.000 0.000 hashlib.py:94(__get_openssl_constructor)
    1 0.000 0.000 0.000 0.000 t.py:39(TreeModel)
    1 0.000 0.000 0.000 0.000 {function seed at 0x02563CB0}
    1 0.000 0.000 0.000 0.000 random.py:72(Random)
    2 0.000 0.000 0.000 0.000 {built-in method expand}
    1 0.000 0.000 0.000 0.000 atexit.py:6(<module>)
    1 0.000 0.000 0.000 0.000 {math.exp}
    2 0.000 0.000 0.000 0.000 {built-in method addWidget}
    2 0.000 0.000 0.000 0.000 {time.clock}
    1 0.000 0.000 0.000 0.000 {built-in method setHeaderHidden}
    7 0.000 0.000 0.000 0.000 __future__.py:75(__init__)
    1 0.000 0.000 0.000 0.000 {built-in method resize}
    6 0.000 0.000 0.000 0.000 {getattr}
    1 0.000 0.000 0.000 0.000 {built-in method setContentsMargins}
    1 0.000 0.000 0.000 0.000 {binascii.hexlify}
    1 0.000 0.000 0.010 0.010 random.py:91(__init__)
    1 0.000 0.000 0.000 0.000 t.py:6(TreeItem)
    1 0.000 0.000 0.000 0.000 {hasattr}
    1 0.000 0.000 0.000 0.000 {built-in method setContextMenuPolicy}
    1 0.000 0.000 0.000 0.000 atexit.py:37(register)
    1 0.000 0.000 0.000 0.000 random.py:653(WichmannHill)
    1 0.000 0.000 0.000 0.000 {_hashlib.openssl_md5}
    1 0.000 0.000 0.000 0.000 random.py:803(SystemRandom)
    1 0.000 0.000 0.000 0.000 {built-in method setUniformRowHeights}
    1 0.000 0.000 0.000 0.000 {math.sqrt}
    1 0.000 0.000 0.000 0.000 __future__.py:74(_Feature)
    2 0.000 0.000 0.000 0.000 {math.log}
    1 0.000 0.000 0.000 0.000 t.py:122(Frame)
    1 0.000 0.000 0.000 0.000 t.py:106(Tree)
    6 0.000 0.000 0.000 0.000 {globals}
    1 0.000 0.000 0.000 0.000 {_hashlib.openssl_sha512}
    1 0.000 0.000 0.000 0.000 {_hashlib.openssl_sha1}
    1 0.000 0.000 0.000 0.000 {_hashlib.openssl_sha256}
    1 0.000 0.000 0.000 0.000 __init__.py:1(<module>)
    1 0.000 0.000 0.000 0.000 {_hashlib.openssl_sha384}
    1 0.000 0.000 0.000 0.000 {_hashlib.openssl_sha224}
    1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}


    It sounds pretty strange to me...the functions hasChildren, index, hasIndex are called 3 millions (!!!) of times. As the other qt views I expect these functions to be called only for the displayed items, while here they seem to be called for all the items of the model. I really don't understand if there is an error inside my code or if I'm missing something..any ideas? Again, thanks for your help!

  4. #4
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: [PyQt4] QTreeView performance issue

    I don't think you need to reset the model in your slot.

  5. #5
    Join Date
    Nov 2012
    Posts
    14
    Qt products
    Platforms
    Windows

    Default Re: [PyQt4] QTreeView performance issue

    norobro, thanks for your answer. You are right, there is no need to reset the model and actually removing that line of code greatly improves performance. Nevertheless, I still have some doubts about how QTreeView handles model data. I re-ran cProfile on the script; this time I simply opened and closed the widget. Here are the most time-consuming functions:

    ncalls tottime percall cumtime percall filename:lineno(function)
    1 351.580 351.580 351.586 351.586 {built-in method exec_}
    1 6.182 6.182 29.876 29.876 {built-in method show}
    2000274 5.825 0.000 10.487 0.000 {built-in method hasIndex}
    2000274 4.868 0.000 18.977 0.000 test.py:79(index)
    1 3.251 3.251 6.411 6.411 test.py:40(__init__)
    2000006 2.738 0.000 4.720 0.000 test.py:73(hasChildren)
    1000002 2.578 0.000 2.578 0.000 test.py:7(__init__)
    2000312 2.550 0.000 4.409 0.000 test.py:99(rowCount)
    2000604 2.508 0.000 2.508 0.000 {built-in method createIndex}
    4000318 1.232 0.000 1.597 0.000 test.py:18(childCount)
    6000986 1.178 0.000 1.178 0.000 {built-in method isValid}
    4000318 1.033 0.000 1.033 0.000 {built-in method column}
    6001157 0.692 0.000 0.692 0.000 {built-in method internalPointer}
    2000274 0.455 0.000 0.455 0.000 test.py:15(child)
    1000001 0.402 0.000 0.504 0.000 test.py:12(appendChild)
    4000318 0.365 0.000 0.365 0.000 {len}
    2000282 0.252 0.000 0.252 0.000 test.py:62(columnCount)
    2000002 0.180 0.000 0.180 0.000 {method 'append' of 'list' objects}

    The functions index, hasIndex, hasChildren, rowCount...are still called 2 millions of times. As far as I know, this is not the way views are expected to work (probably that's an error in my script!). It could be really useful if someone more expert than me could give an explanation of this behaviour. Thanks!

  6. #6
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: [PyQt4] QTreeView performance issue

    You're welcome.

    The following is the cProfile output that I get for your code above:
    Qt Code:
    1. 1033315 function calls in 4.485 seconds
    2.  
    3. Ordered by: internal time
    4.  
    5. ncalls tottime percall cumtime percall filename:lineno(function)
    6. 1 3.468 3.468 4.485 4.485 {built-in method exec_}
    7. 1 0.881 0.881 0.980 0.980 /usr/lib/python2.7/random.py:276(shuffle)
    8. 999999 0.099 0.000 0.099 0.000 {method 'random' of '_random.Random' objects}
    9. 3275 0.006 0.000 0.006 0.000 {built-in method createIndex}
    10. 1232 0.006 0.000 0.024 0.000 ./treeview.py:57(_ItemFromIndex)
    11. 1383 0.005 0.000 0.010 0.000 {built-in method hasIndex}
    12. 1383 0.004 0.000 0.018 0.000 ./treeview.py:83(index)
    13. 879 0.003 0.000 0.006 0.000 ./treeview.py:91(parent)
    14. 1556 0.003 0.000 0.005 0.000 ./treeview.py:103(rowCount)
    15. 1232 0.002 0.000 0.027 0.000 ./treeview.py:69(data)
    16. 5050 0.002 0.000 0.002 0.000 {built-in method isValid}
    17. 6067 0.001 0.000 0.001 0.000 {built-in method internalPointer}
    18. 179 0.001 0.000 0.001 0.000 ./treeview.py:74(flags)
    19. 1556 0.001 0.000 0.001 0.000 ./treeview.py:22(childCount)
    20. 1556 0.001 0.000 0.001 0.000 {built-in method column}
    21. 688 0.001 0.000 0.001 0.000 ./treeview.py:37(row)
    22. 1204 0.000 0.000 0.000 0.000 {built-in method row}
    23. 1383 0.000 0.000 0.000 0.000 ./treeview.py:19(child)
    24. 1557 0.000 0.000 0.000 0.000 {len}
    25. 688 0.000 0.000 0.000 0.000 {method 'index' of 'list' objects}
    26. 1383 0.000 0.000 0.000 0.000 ./treeview.py:66(columnCount)
    27. 879 0.000 0.000 0.000 0.000 ./treeview.py:34(parent)
    28. 1 0.000 0.000 0.980 0.980 ./treeview.py:119(Shuffle)
    29. 176 0.000 0.000 0.000 0.000 ./treeview.py:28(data)
    30. 2 0.000 0.000 0.000 0.000 {built-in method model}
    31. 1 0.000 0.000 0.000 0.000 {built-in method expand}
    32. 2 0.000 0.000 0.000 0.000 {time.clock}
    33. 1 0.000 0.000 4.485 4.485 <string>:1(<module>)
    34. 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
    To copy to clipboard, switch view to plain text mode 
    I don't know Python well but if you post (or attach) your actual code, I'll take a look.

  7. #7
    Join Date
    Nov 2012
    Posts
    14
    Qt products
    Platforms
    Windows

    Default Re: [PyQt4] QTreeView performance issue

    Norobro, the results I got with cProfile are obtained with the code I posted originally, not with my actual code, so it is really strange such a difference in the execution time. Maybe is there a difference in the version of PyQt? I use PyQt 4.9.5 with Python 2.7.2 under windows 7. Which is your setup?

  8. #8
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: [PyQt4] QTreeView performance issue

    I'm running Debian unstable w/ python 2.7.4 & pyqt4 4.9.3

    Don't have Windows installed so I can't help you there.

    The code ran slightly slower under python 2.6.8 but with the same number of calls: 1033315 function calls in 5.292 CPU seconds

  9. #9
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: [PyQt4] QTreeView performance issue

    Are you running cProfile from the command line? i.e. python -m cProfile "scriptname"
    I get similar results that way.

    Try running it from your script:
    Qt Code:
    1. from PyQt4.QtCore import *
    2. from PyQt4.QtGui import *
    3. from random import shuffle
    4. from time import clock
    5. import cProfile
    6. import pstats
    7.  
    8. class TreeItem(object) :
    9. . . .
    10. . . .
    11. if __name__ == "__main__" :
    12. import sys
    13. a = QApplication(sys.argv)
    14. dia = Frame(None)
    15. dia.resize(400, 600)
    16. dia.show()
    17. cProfile.run('a.exec_()', 'profdata')
    18. p = pstats.Stats('profdata')
    19. p.sort_stats('calls').print_stats()
    20. # a.exec_()
    To copy to clipboard, switch view to plain text mode 

  10. #10
    Join Date
    Nov 2012
    Posts
    14
    Qt products
    Platforms
    Windows

    Default Re: [PyQt4] QTreeView performance issue

    Yes, I was running cProfile from command line; I executed the profiling as you suggested and I got values more similar to yours:

    Qt Code:
    1. 1070281 function calls in 11.630 seconds
    2.  
    3. Ordered by: call count
    4.  
    5. ncalls tottime percall cumtime percall filename:lineno(function)
    6. 999999 0.102 0.000 0.102 0.000 {method 'random' of '_random.Random' objects}
    7. 12766 0.003 0.000 0.003 0.000 {built-in method internalPointer}
    8. 10632 0.005 0.000 0.005 0.000 {built-in method isValid}
    9. 6793 0.019 0.000 0.019 0.000 {built-in method createIndex}
    10. 3388 0.001 0.000 0.001 0.000 {len}
    11. 3375 0.002 0.000 0.003 0.000 C:\Users\massimiliano\Desktop\t.py:45(childCount)
    12. 3375 0.002 0.000 0.002 0.000 {built-in method column}
    13. 3321 0.009 0.000 0.015 0.000 C:\Users\massimiliano\Desktop\t.py:126(rowCount)
    14. 2961 0.001 0.000 0.001 0.000 C:\Users\massimiliano\Desktop\t.py:42(child)
    15. 2961 0.001 0.000 0.001 0.000 C:\Users\massimiliano\Desktop\t.py:89(columnCount)
    16. 2961 0.014 0.000 0.056 0.000 C:\Users\massimiliano\Desktop\t.py:106(index)
    17. 2961 0.017 0.000 0.031 0.000 {built-in method hasIndex}
    18. 2590 0.021 0.000 0.078 0.000 C:\Users\massimiliano\Desktop\t.py:80(_ItemFromIndex)
    19. 2590 0.008 0.000 0.086 0.000 C:\Users\massimiliano\Desktop\t.py:92(data)
    20. 2520 0.001 0.000 0.001 0.000 {built-in method row}
    21. 1706 0.001 0.000 0.001 0.000 C:\Users\massimiliano\Desktop\t.py:57(parent)
    22. 1706 0.009 0.000 0.019 0.000 C:\Users\massimiliano\Desktop\t.py:114(parent)
    23. 1312 0.002 0.000 0.003 0.000 C:\Users\massimiliano\Desktop\t.py:60(row)
    24. 1312 0.001 0.000 0.001 0.000 {method 'index' of 'list' objects}
    25. 370 0.000 0.000 0.000 0.000 C:\Users\massimiliano\Desktop\t.py:51(data)
    26. 370 0.002 0.000 0.002 0.000 C:\Users\massimiliano\Desktop\t.py:97(flags)
    27. 54 0.000 0.000 0.000 0.000 C:\Users\massimiliano\Desktop\t.py:100(hasChildren)
    28. 28 0.000 0.000 0.000 0.000 C:\Python27\lib\idlelib\rpc.py:149(debug)
    29. 20 0.000 0.000 0.000 0.000 {thread.get_ident}
    30. 20 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:63(_note)
    31. 16 0.061 0.004 0.061 0.004 {method 'acquire' of 'thread.lock' objects}
    32. 8 0.000 0.000 0.000 0.000 {method 'release' of 'thread.lock' objects}
    33. 8 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:58(__init__)
    34. 8 0.000 0.000 0.000 0.000 {thread.allocate_lock}
    35. 8 0.000 0.000 0.000 0.000 {isinstance}
    36. 8 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:826(currentThread)
    37. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:141(release)
    38. 4 0.000 0.000 0.000 0.000 {getattr}
    39. 4 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects}
    40. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:186(__init__)
    41. 4 0.000 0.000 0.061 0.015 C:\Python27\lib\threading.py:235(wait)
    42. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:159(_acquire_restore)
    43. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:167(_release_save)
    44. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\idlelib\rpc.py:317(newseq)
    45. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:177(_is_owned)
    46. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:101(RLock)
    47. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\socket.py:223(meth)
    48. 4 0.000 0.000 0.062 0.015 C:\Python27\lib\idlelib\rpc.py:279(getresponse)
    49. 4 0.000 0.000 0.001 0.000 C:\Python27\lib\idlelib\rpc.py:218(asynccall)
    50. 4 0.000 0.000 0.062 0.015 C:\Python27\lib\idlelib\rpc.py:295(_getresponse)
    51. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:106(__init__)
    52. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\idlelib\rpc.py:244(decoderesponse)
    53. 4 0.000 0.000 0.000 0.000 {select.select}
    54. 4 0.000 0.000 0.062 0.015 C:\Python27\lib\idlelib\rpc.py:238(asyncreturn)
    55. 4 0.000 0.000 0.000 0.000 {_struct.pack}
    56. 4 0.000 0.000 0.001 0.000 C:\Python27\lib\idlelib\rpc.py:321(putmessage)
    57. 4 0.000 0.000 0.063 0.016 C:\Python27\lib\idlelib\rpc.py:594(__call__)
    58. 4 0.000 0.000 0.063 0.016 C:\Python27\lib\idlelib\rpc.py:208(remotecall)
    59. 4 0.000 0.000 0.000 0.000 {cPickle.dumps}
    60. 4 0.000 0.000 0.000 0.000 {method 'fileno' of '_socket.socket' objects}
    61. 4 0.000 0.000 0.000 0.000 {method 'append' of 'list' objects}
    62. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\idlelib\rpc.py:546(__getattr__)
    63. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\idlelib\rpc.py:589(__init__)
    64. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\idlelib\rpc.py:287(_proxify)
    65. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:181(Condition)
    66. 4 0.001 0.000 0.001 0.000 {method 'send' of '_socket.socket' objects}
    67. 4 0.000 0.000 0.000 0.000 C:\Python27\lib\threading.py:121(acquire)
    68. 2 0.000 0.000 0.000 0.000 {time.clock}
    69. 2 0.000 0.000 0.000 0.000 {built-in method model}
    70. 1 0.003 0.003 0.003 0.003 {built-in method expand}
    71. 1 0.000 0.000 1.371 1.371 C:\Users\massimiliano\Desktop\t.py:142(Shuffle)
    72. 1 10.139 10.139 11.630 11.630 {built-in method exec_}
    73. 1 0.000 0.000 11.630 11.630 <string>:1(<module>)
    74. 1 1.203 1.203 1.305 1.305 C:\Python27\lib\random.py:276(shuffle)
    75. 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
    To copy to clipboard, switch view to plain text mode 

    To be honest, I really don't understand what's going on...

Similar Threads

  1. Replies: 2
    Last Post: 8th December 2010, 20:37
  2. [PyQt4] PyQt4 + gcin issue
    By fieliapm in forum Installation and Deployment
    Replies: 0
    Last Post: 28th September 2010, 08:04
  3. Performance issue
    By Skorpien126 in forum Qt Programming
    Replies: 4
    Last Post: 2nd July 2010, 16:02
  4. PyQt4 - QPlainTextEdit: performance when hidding blocks
    By josemaria.alkala in forum Newbie
    Replies: 6
    Last Post: 27th June 2010, 14:58
  5. Performance Issue
    By linuxdev in forum Qt Programming
    Replies: 1
    Last Post: 10th December 2008, 15:00

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.