Bug 291425 - [update policy][variables] When stepping fast view flickers in stale data color.
Summary: [update policy][variables] When stepping fast view flickers in stale data color.
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf (show other bugs)
Version: 6.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.0   Edit
Assignee: Pawel Piech CLA
QA Contact: Pawel Piech CLA
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2009-10-05 16:55 EDT by Pawel Piech CLA
Modified: 2010-05-28 13:28 EDT (History)
2 users (show)

See Also:
aleherb+eclipse: review+


Attachments
Patch with proposed fix. (6.91 KB, patch)
2009-10-05 16:55 EDT, Pawel Piech CLA
pawel.1.piech: iplog-
Details | Diff
Patch with additional fix. (2.79 KB, patch)
2009-10-06 11:19 EDT, Pawel Piech CLA
pawel.1.piech: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Piech CLA 2009-10-05 16:55:27 EDT
Created attachment 148827 [details]
Patch with proposed fix.

The stale data color indicates that the data in the view is no longer accurate,
and that the view needs to be refreshed.  The problem is that this color
sometimes shows up in the variables views when stepping fast even when the view
is in the automatic update mode.  This degrades performance as the UI repaints
the view needlessly.

The reason for the flickering is that the DSF View Model (VM) optimizes out
view updates when the events are arriving faster than the VM can process them. 
This is implemented by not flushing the cache, however the view may still be
periodically repainted.  When the cache data is not flushed and a target event
indicates that it should be, the cache data is marked as stale.  If the view
happens to be repainted in that time, then the view will show data as stale.

The fix that I implemented simply disables the stale data marking when in
automatic update mode.  I don't think it should have any bad side effects.
Comment 1 Pawel Piech CLA 2009-10-05 16:57:48 EDT
I committed the fix.  Toni please review.
Comment 2 Anton Leherbauer CLA 2009-10-06 07:02:08 EDT
There is one problem with this patch:

When I switch to manual mode and perform a step, the color does not change to gray.  I have to refresh once, then the next step changes to gray again.
The reason seems to be that the update policy id is also cached with the other properties and subsequent updates occur with the wrong update policy id.
Comment 3 Pawel Piech CLA 2009-10-06 11:19:33 EDT
Created attachment 148904 [details]
Patch with additional fix.

(In reply to comment #2)
Oops!  This patch adds logic to update this property on cache hits too.
Comment 4 Pawel Piech CLA 2009-10-06 11:21:20 EDT
Committed the additional fix.  Toni, please take a look again.
Comment 5 Pawel Piech CLA 2009-10-06 11:21:35 EDT
Forgot to mark fixed.
Comment 6 Anton Leherbauer CLA 2009-10-08 03:29:16 EDT
Looks good now.