mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
run LaterInvocator events in small batches
to decrease the number of Swing events produced to eliminate "too many events" from LaterInvocator redispatches to make TransferToEDTQueue not so necessary
This commit is contained in:
+9
-2
@@ -394,8 +394,15 @@ public class LaterInvocator {
|
||||
@Override
|
||||
public void run() {
|
||||
FLUSHER_SCHEDULED.set(false);
|
||||
if (runNextEvent()) {
|
||||
requestFlush();
|
||||
long startTime = System.currentTimeMillis();
|
||||
while (true) {
|
||||
if (!runNextEvent()) {
|
||||
return;
|
||||
}
|
||||
if (System.currentTimeMillis() - startTime > 5) {
|
||||
requestFlush();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user