Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315425 - CodanMarkerProblemReporter should batch marker deletion
Summary: CodanMarkerProblemReporter should batch marker deletion
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 7.0   Edit
Assignee: Elena Laskavaia CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 12:50 EDT by James Blackburn CLA
Modified: 2010-06-16 20:30 EDT (History)
1 user (show)

See Also:


Attachments
suggested fix (2.90 KB, patch)
2010-06-02 12:50 EDT, James Blackburn CLA
jamesblackburn+eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2010-06-02 12:50:48 EDT
Created attachment 170836 [details]
suggested fix

I'm seeing slow interactive editor response when copying and pasting code.

Part of the problem seems to be CodanMarkerProblemReporter#deleteProblems(IResource, IChecker).  This deletes the markers one at a time, causing a resource change event to be fired after each marker is deleted, leading to recompute of editor and navigation tree annotations multiple times for every editor edit.

This change should be batched in a workspace runnable to prevent over-zealous notification.
Comment 1 James Blackburn CLA 2010-06-02 12:53:38 EDT
There's the same issue with #reportProblem
Comment 2 James Blackburn CLA 2010-06-02 13:03:03 EDT
(In reply to comment #1)
> There's the same issue with #reportProblem
A better approach would be for the checkers, when they run, to either:
  - Remove and set the markers all in one workspace operation
 or better:
  - Remove and re-add just the markers that have disappeared and been re-added.  

The current behaviour performs pretty badly here as each marker modification causes all the listeners to be notified.
Comment 3 Elena Laskavaia CLA 2010-06-02 13:58:44 EDT
You can apply delete marker patch but the insert should wait for next release,
it would require some refactoring
Comment 4 CDT Genie CLA 2010-06-02 21:23:00 EDT
*** cdt cvs genie on behalf of elaskavaia ***
Bug 315425 batch marker deletion (James' patch)

[*] CodanMarkerProblemReporter.java 1.13 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanMarkerProblemReporter.java?root=Tools_Project&r1=1.12&r2=1.13
Comment 5 Elena Laskavaia CLA 2010-06-16 20:30:26 EDT
original problem was fixed in 7.0, need to open another bug for comment #2