Bug 172658 - [logview] should batch updates
Summary: [logview] should batch updates
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Jacek Pospychala CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, performance
Depends on:
Blocks:
 
Reported: 2007-02-02 09:12 EST by Michael Valenta CLA
Modified: 2007-12-04 08:51 EST (History)
1 user (show)

See Also:


Attachments
mylyn/context/zip (733 bytes, application/octet-stream)
2007-11-07 19:59 EST, Chris Aniszczyk CLA
no flags Details
patch (6.00 KB, patch)
2007-12-04 04:20 EST, Jacek Pospychala CLA
no flags Details | Diff
mylyn/context/zip (7.18 KB, application/octet-stream)
2007-12-04 04:20 EST, Jacek Pospychala CLA
no flags Details
mylyn/context/zip (7.73 KB, application/octet-stream)
2007-12-04 08:50 EST, Chris Aniszczyk CLA
no flags Details
mylyn/context/zip (7.73 KB, application/octet-stream)
2007-12-04 08:51 EST, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Valenta CLA 2007-02-02 09:12:57 EST
I was debugging a problem and needed to stick a breakpoint on TreeViewer#setExpanded. When I did this, I would constantly get hits from the log view which seems to refresh when the Eclipse window is activated. I closed the view but the problem persisted. Ihad to close all perspectives to get the log view to clear. Has the LogView been registered as a perspective listener? If so, it should be removed when the view is closed.
Comment 1 Wassim Melhem CLA 2007-02-02 09:54:22 EST
from the drop down menu of the log view, there should be an option to turn off the 'Activate on new events' feature.

does that work for you?
Comment 2 Michael Valenta CLA 2007-02-02 10:24:59 EST
After some playing around, I am not able to reproduce the problem. However, I noticed that for each log entry, the view fires an asyncExec. I have some UI code loaded from HEAD which is logging a lot of errors so it is likely that there was a backlog of asyncExecs being processed after the view was closed. What we usually do in cases like this is keep of queue of pending entries and have a single job that processes them. This allows for batched processing when a large number of errors are being logged and makes it possible to cancel the job if the view is closed.
Comment 3 Chris Aniszczyk CLA 2007-11-07 19:59:14 EST
hi Jacek :)
Comment 4 Chris Aniszczyk CLA 2007-11-07 19:59:18 EST
Created attachment 82397 [details]
mylyn/context/zip
Comment 5 Jacek Pospychala CLA 2007-12-04 04:20:55 EST
Created attachment 84393 [details]
patch

Batch entries when LogView is closed (actually hidden). When view goes back to life (Window->Show View->Log View), all batched entries are added in a Job.

As a result there are no more asyncExec's as long as view is closed. And there is only one when view is displayed for first time.

Brian or Chris, please review :)
Comment 6 Jacek Pospychala CLA 2007-12-04 04:20:58 EST
Created attachment 84394 [details]
mylyn/context/zip
Comment 7 Chris Aniszczyk CLA 2007-12-04 08:50:44 EST
Will do Jacek :)
Comment 8 Chris Aniszczyk CLA 2007-12-04 08:50:50 EST
Created attachment 84412 [details]
mylyn/context/zip
Comment 9 Chris Aniszczyk CLA 2007-12-04 08:51:30 EST
Great patch Jacek, I made some minor modifications but other than that, things look good.
Comment 10 Chris Aniszczyk CLA 2007-12-04 08:51:35 EST
Created attachment 84413 [details]
mylyn/context/zip