Bug 217801

Summary: Formatting currently open source file freezes IDE for a couple of minutes.
Product: [Developer tools] kdevplatform Reporter: Maciej Mrozowski <reavertm>
Component: sourceformatterAssignee: kdevelop-bugs-null
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Maciej Mrozowski 2009-12-08 00:44:15 UTC
Version:           trunk as of 8/12/2009 (using Devel)
Compiler:          gcc (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4 
OS:                Linux
Installed from:    Compiled sources

Steps to reproduce

1. Open kdevelop and open sope C or C++ project.
2. Select astyle source formatter.
3. Open some relatively big (over 60KiB) source file in editor.
4. (optionally wait for background parser to finish all jobs).
5. Active 'Reformat source' - either from keyboard shortcut or from editor context menu.
6. Have a cup of coffee... (it will take a lot)

Now compare it with time needed to reformat source that's not opened in any editor window (at least in not active one) - it will take a few seconds at most.

Clearly there's some conflict of interest between source formatter and either duchain parser or syntax coloring or anything that may analyze open document in the process.
Comment 1 Andreas Pakulat 2009-12-08 09:06:48 UTC

*** This bug has been marked as a duplicate of bug 215200 ***