Bug 365633

Summary: GUI freezes due to assistant problem hack
Product: [Applications] kdevelop Reporter: Milian Wolff <mail>
Component: Language Support: CPP (Clang-based)Assignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: grave CC: mail
Priority: NOR Keywords: release_blocker
Version First Reported In: git master   
Target Milestone: 5.0.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Milian Wolff 2016-07-13 20:18:59 UTC
The merge of the assistant-ng branch shows a big issue with the hack that is used to show problems in the editor for assistant ranges. Namely, we have this now:

void ProblemReporterPlugin::updateReady(const IndexedString& url, const KDevelop::ReferencedTopDUContext& top)
{
    {
      DUChainWriteLocker lock(DUChain::lock(), 300);
      ...

On initial parse, this will be triggered a lot (as many files are getting updated. Each time, we will block the GUI for some time to wait up to 300ms. Note that our BKL is under heavy load at that time, and write locks are not fair and thus often starved by read locks elsewhere.

This must be rewritten to not modify the DUChain for whatever purpose it's serving (squiggly lines in the editor?)

Reproducible: Always

Steps to Reproduce:
1. open large project(s) in kdevelop
2. try to interact with the editor to trigger assistants


Actual Results:  
gui is often time blocked

Expected Results:  
no blocks
Comment 1 Sven Brauch 2016-07-13 22:17:05 UTC
My fault, I'll take care of it in the next days.
Comment 2 Sven Brauch 2016-07-16 14:10:05 UTC
Should be fixed with f1f2134051.