GNOME Bugzilla – Bug 760414
Wide file causes builder to chug
Last modified: 2018-01-11 09:56:02 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.
There is no attached file
Created attachment 319161 [details] Causes a lot of cpu usage Sorry about that. Here's a second attempt at an upload.
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.
(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.
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.
Another thing we do at startup that is I/O intensive is walking the file-tree to build the search index.
-- 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.