After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 737562 - GbSourceChangeMonitor should generate file diffs in a worker thread
GbSourceChangeMonitor should generate file diffs in a worker thread
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: editor
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-29 07:21 UTC by Christian Hergert
Modified: 2014-09-29 08:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
change-monitor: perform ggit_diff_blob_to_buffer() in a thread. (6.38 KB, patch)
2014-09-29 08:10 UTC, Christian Hergert
committed Details | Review

Description Christian Hergert 2014-09-29 07:21:25 UTC
Right now it is done synchronously in a g_timeout_add() callback. This timeout should instead push the work onto a queue for which a shared thread performs the diffs. (We shouldn't ever really be doing more than one or two at a time anyway).
Comment 1 Christian Hergert 2014-09-29 08:10:31 UTC
Created attachment 287323 [details] [review]
change-monitor: perform ggit_diff_blob_to_buffer() in a thread.
Comment 2 Christian Hergert 2014-09-29 08:11:36 UTC
Using the thread pool from GSimpleAsyncResult to perform the parsing in a thread. The result is then handed back to the main thread to apply to the monitor instance.