I am trying to load 1k+ lines long files into GtkSourceView, using GTK3 in Python (PyGObject).
Whenever I set the text, it takes 2-3sec to fully appear (it is slowly scrolling and adding new lines at the bottom). I have connected a profiler and it shows 99.5% of cpu time in Gtk.main.
Basically I am using this for setting text:
txt_sourceview.get_buffer().set_text(new_text)
Am I doing something wrong here? Is there a way to speed this up?