Skip to content

Commit 35efdd5

Browse files
committed
Perform initial work in the job
Currently the first thing a reconciler after startup does is to sleep for a while then call initialProcess then start the processing loop (that sleeps again...). This now moves this initial work into the start job so we have a plain processing loop in the thread to make further improvements easier.
1 parent f41ea06 commit 35efdd5

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/reconciler/AbstractReconciler.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,6 @@ public void reset() {
172172
*/
173173
@Override
174174
public void run() {
175-
176-
delay();
177-
178-
if (fCanceled)
179-
return;
180-
181-
initialProcess();
182-
183175
while (!fCanceled) {
184176

185177
delay();
@@ -230,6 +222,11 @@ public void startReconciling() {
230222
}
231223
fStarted= true;
232224
Job.createSystem("Delayed Reconciler startup", m -> { //$NON-NLS-1$
225+
delay();
226+
if (fCanceled) {
227+
return Status.CANCEL_STATUS;
228+
}
229+
initialProcess();
233230
try {
234231
start();
235232
return Status.OK_STATUS;

0 commit comments

Comments
 (0)