Heim  >  Artikel  >  Backend-Entwicklung  >  有关wxpython pyqt内存占用问题分析

有关wxpython pyqt内存占用问题分析

WBOY
WBOYOriginal
2016-06-16 08:43:521287Durchsuche

一直觉得wxpython占用内存比较多,在工作中写的一些小程序应用,一对比其它的小程序,发现内存相差确实有点大。

测试了下QT框架

复制代码 代码如下:

import sys,time
from PyQt4 import QtCore, QtGui
#import wx
if __name__ == "__main__":
while True:
time.sleep(1)

只载入了框架,内存占用就有明显差别。
载入wx的时候一般在20M左右,我写的几个应用也差不多是这么多,所以占用内存多的主要是框架,程序实际占用的大概只有几M左右。
载入pyqt大概在9M左右,具体应用中没做过测试。
看来以后还是可以尝试下QT框架的开发,而且还有Designer。

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn