I have developed an application using Python 2.7 and PyQt4. Usually when I start my application it start within a second, but when I do start/restart my computer an than I start application for the very first time, It takes countable amount of time. I did following module import to my application.
import cStringIO
import imp
import os
import sys
import taurus
import time
import traceback
from PyQt4 import QtCore
from PyQt4 import QtGui
from taurus.qt.qtgui.display import TaurusLabel
from taurus.qt.qtgui.util.ui import UILoadable
Then I have my main function as
if __name__ == "__main__":
logger.debug("In mainWindow - Executing Main function.")
app = QtGui.QApplication(sys.argv)
I tried using print statement and also checked time for every import. Sometimes it takes time to import lines
from PyQt4 import QtCore
from PyQt4 import QtGui
and sometime
app = QtGui.QApplication(sys.argv)
takes too much time to execute. I don't know why this strange behavior is happening. My application is working on Ubuntu 16.04 and software version are PyQt4, Python 2.7, Taurus-4.1.1, PyTango 8.1.8,
This behavior happens only for the first time after start up of system. Please suggest something that I can tryout. I think this is some serious issue with the tool or application developed by me.
Any help is appreciated...