I am have written small application in which dictionary contain large string but when I used to display string into QPlainTextEdit it consume large memory and my application is crashed. is there any effective to update text into Qplaintextedit
size of string 464.6005735397339
Line # Mem usage Increment Line Contents
================================================
807 1556.8 MiB 1556.8 MiB @profile
808 def load_violation_data(self, a="", b=""):
809 """
810 update
811 into.
812 """
813 1556.8 MiB 0.0 MiB self.clear_selection()
814 1556.8 MiB 0.0 MiB domain_obj = self.list_widget.selectedItems()[0]
815 1556.8 MiB 0.0 MiB domain_obj.setBackground(QBrush(QColor("#8A2BE2")))
816 1556.8 MiB 0.0 MiB self.app.setOverrideCursor(Qt.WaitCursor)
817 1556.8 MiB 0.0 MiB data = self.violation_data[domain_obj.text()]
818 1556.8 MiB 0.0 MiB print (sys.getsizeof(data)/1024**2)
819 4532.4 MiB 2975.6 MiB self.plain_textedit.setPlainText(data)
820 4532.4 MiB 0.0 MiB self.violation_label.setText(self.vio_dm.get_output_file_prefix(domain_obj.text()))
821 4532.4 MiB 0.0 MiB self.app.restoreOverrideCursor()