Changes between Version 2 and Version 3 of tipsTricks

Show
Ignore:
Timestamp:
05/19/09 11:00:44 (6 months ago)
Author:
reeuwijk@… (IP: 82.95.119.212)
Comment:

spelling correction

Legend:

Unmodified
Added
Removed
Modified
  • tipsTricks

    v2 v3  
    77= Tips & Tricks = 
    88 
    9 1. Don't use any [wiki:BlockingFunctions blocking functions] in the sensitive threads. The sensitive threads are the MainThread that performs all calls to the GUI library (so slowing that down halt the user interface) and the network thread, usually called ABCLaunchManyThread-X of which there is only one, so slowing that down will stop *all* network traffic of Tribler. The network thread can be highly sensitive, we have had a case where even allocating a database wrapper (e.g. PeerDBHandler()) too often brought download speeds to zero. 
     91. Don't use any [wiki:BlockingFunctions blocking functions] in the sensitive threads. The sensitive threads are the MainThread that performs all calls to the GUI library (so slowing that down halts the user interface) and the network thread, usually called ABCLaunchManyThread-X of which there is only one, so slowing that down will stop *all* network traffic of Tribler. The network thread can be highly sensitive, we have had a case where even allocating a database wrapper (e.g. PeerDBHandler()) too often brought download speeds to zero. 
    1010 
    11112. Don't let any other thread than the MainThread call the GUI library (wx). On Linux this will mess up the GUI completely, on Windows this sometimes leads to crashes as the GUI library is not thread safe. Hence, use wx.CallAfter(function) to delegate GUI updates from a thread to the MainThread. Previously we used our own invokeLater () method (see safeguiupdate.py) for this, but we should phase that out.