title: How to speed up the python code execution for Qt connect and for communication with another PC
body: <p>The problem is that when some data arrives through the internet line, the event function is connected to be executed. But the data is so massive that the data comes before the event is executed. and The connect event function stops and data cannot be achieved mostly.</p>
  
  <p>I fixed the event function as concisely as possible.</p>
  
  <pre><code>from PyQt5.QAxContainer import *
  from PyQt5.QtCore import *
  
  class AAA:
      def __init__(self):
          self.dict_real_contract = {}
          self.test = QAxWidget('api.ctrl.1')
          self.test.OnReceiveRealData.connect(self.onreceiverealdata)
  
      def onreceiverealdata(self, input1, input2, input3):
          if input1 == 'contract':   
              list_item_name = ['a', 'b', 'c', 'd']
              lists = self.dict_real_contract.get(input1, [])
              dicts = {}
              for i, in list_item_name:
                  dicts[i] = self.api1(input2, input3)
              lists.append(dicts)
              self.dict_real_contract[input1] = lists
  
      def api1(self, input2, input3):
          res = self.test.dynamicCall('api1(QString, int, int)', input2, input3)
  
      def run(self):
          while True:
              pass
  
  app.QApplication(sys.argv)
  temp = AAA()
  temp.run()
  sys.exit(app.exec_())
  </code></pre>
  
  <p>I used api provided by third party.
  "OnReceiveRealData" is a function that executes an event when data is received through communication. So "onreceiverealdata" is executed when the data is received.
  The description of this code is to wait for events.
  and If data received, "onreceiverealdata" just classify the values in the "self.dict_real_contract" variable. That's all and simple.
  In my opinion, too much data is suddenly received, so it seems to stop before processing.</p>