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 760414 - Wide file causes builder to chug
Wide file causes builder to chug
Status: RESOLVED OBSOLETE
Product: gnome-builder
Classification: Other
Component: editor
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-10 21:59 UTC by Jon
Modified: 2018-01-11 09:56 UTC
See Also:
GNOME target: ---
GNOME version: 3.17/3.18


Attachments
Causes a lot of cpu usage (48.36 KB, text/x-java)
2016-01-15 23:25 UTC, Jon
Details

Description Jon 2016-01-10 21:59:12 UTC
Using the attached file gnome builder goes to 100% cpu usage for a while before rendering the file. A similar chug occurs when moving off of the long lines back to short lines.
Comment 1 Ben 2016-01-15 18:39:02 UTC
There is no attached file
Comment 2 Jon 2016-01-15 23:25:55 UTC
Created attachment 319161 [details]
Causes a lot of cpu usage

Sorry about that. Here's a second attempt at an upload.
Comment 3 Wolf Vollprecht 2016-06-22 01:35:43 UTC
Is this caused only by the wide file? I noticed super-high CPU usage for opening any file/project for the first time on a fresh install, almost crashing my computer and maxing out the 4 cores I have.

It seems fine after the first time opening though.
Comment 4 Christian Hergert 2016-06-22 02:13:50 UTC
(In reply to Jon from comment #0)
> Using the attached file gnome builder goes to 100% cpu usage for a while
> before rendering the file. A similar chug occurs when moving off of the long
> lines back to short lines.

The original wide-file is definitely related to GtkTextView not having line-character indexes in the BTree for fast lookups (like we do for lines). Not really something we can fix without rewriting portions of textview.

(In reply to Wolf Vollprecht from comment #3)
> Is this caused only by the wide file? I noticed super-high CPU usage for
> opening any file/project for the first time on a fresh install, almost
> crashing my computer and maxing out the 4 cores I have.
> 
> It seems fine after the first time opening though.

Hard to say, but it could be us building ctags indexes for the opened project. If it is a large project, that could take a little longer.

Generally we try to do a lot of work as async tasks, so its likely we use "all available cores" in those cases to complete the work as soon as possible.

But if Builder can crash your computer, that is a violation of the OS more than anything. Hopefully Linux 4.7 will land the I/O subsystem fixes to help there.
Comment 5 Wolf Vollprecht 2016-06-22 02:21:53 UTC
Well, it's great to do it async. But if it freezes the entire desktop, there is no point ... it makes Builder look super-buggy if the first thing that happens is desktop freezing for 30 seconds. Many people will have killed the program by then. 

This is what it looks like: https://imgur.com/BXSPCAc
Happens to me with a freshly opened C++ project and a Python project. 

Maybe somehow limit it to n-1 cores? Or even only one core..?

This is on Fedora 24 / with Builder from official repository.
Comment 6 Christian Hergert 2016-06-22 02:39:41 UTC
Another thing we do at startup that is I/O intensive is walking the file-tree to build the search index.
Comment 7 GNOME Infrastructure Team 2018-01-11 09:56:02 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-builder/issues/63.