| Summary: | High amount of idle work done by StructuredRegionProcessor | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Patric Rufflar <patric> | ||||
| Component: | wst.sse | Assignee: | Nick Sandonato <nsand.dev> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | nsand.dev | ||||
| Version: | unspecified | Keywords: | performance | ||||
| Target Milestone: | 3.3 M7 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Patric Rufflar
Hi Patric, Thanks again for your continued investigation into Source Editing. Each of these instances of StructuredRegionProcessor is a reconciler for the opened editor. So the number of threads you see is to be expected. When opening 100 editors all at the same time, each editor performs its initial reconciling of the document to generate things like spelling annotations, as-you-type validation errors, and semantic highlighting. But, we definitely don't want to do work when there's nothing to do be done. So after that initial pass, each reconciling thread needs to check to see if any work has been add to its queue. As long as nothing's been modified in the document, the job is just rescheduled. I believe this is what you see as heavy-weight in this: the constant rescheduling. So I think we might be able to go at this by trimming some of the fat, and going with a Thread implementation similar to AbstractReconciler's BackgroundThread. While I understand the aggravation from this, I'm toning down the severity based on the Eclipse bugzilla definition of 'critical'. Created attachment 193100 [details]
patch
Shot at a patch. With the BackgroundThread, I didn't notice any periodic spikes like would occasionally happen with the Job implementation.
New Thread-based implementation checked into HEAD. Thank you, Nick. Will the patch also be part of the upcoming 3.2.4 release? You're quite welcome, Patric. I had not planned on releasing this to 3.2.4 as I felt the changes might be a little drastic for a maintenance release, especially being fairly late in the development of 3.2.4. |