summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Ptaszkiewicz2012-12-20 14:53:43 (EST)
committer Paul Webster2012-12-20 14:53:43 (EST)
commit9df5050edd19d95015a4c8e427771126a2053b08 (patch)
treebd587ae3cc693fe7c735d62802c7a834131bcfdb
parent8bac5c35cf2b4c6162076bd6a203a72800721804 (diff)
downloadeclipse.platform.runtime-9df5050edd19d95015a4c8e427771126a2053b08.zip
eclipse.platform.runtime-9df5050edd19d95015a4c8e427771126a2053b08.tar.gz
eclipse.platform.runtime-9df5050edd19d95015a4c8e427771126a2053b08.tar.bz2
Bug 389251 - [Performance] Idle Eclipse constantly allocates hundreds of
objects per second Prevent allocation of ContextChangeEvent when there's nothing to send.
-rw-r--r--bundles/org.eclipse.e4.core.contexts/src/org/eclipse/e4/core/internal/contexts/EclipseContext.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.core.contexts/src/org/eclipse/e4/core/internal/contexts/EclipseContext.java b/bundles/org.eclipse.e4.core.contexts/src/org/eclipse/e4/core/internal/contexts/EclipseContext.java
index 6e37537..767e77c 100644
--- a/bundles/org.eclipse.e4.core.contexts/src/org/eclipse/e4/core/internal/contexts/EclipseContext.java
+++ b/bundles/org.eclipse.e4.core.contexts/src/org/eclipse/e4/core/internal/contexts/EclipseContext.java
@@ -497,7 +497,7 @@ public class EclipseContext implements IEclipseContext {
parent.processWaiting();
return;
}
- if (waiting == null)
+ if (waiting == null || waiting.isEmpty())
return;
// create update notifications
Computation[] ls = waiting.toArray(new Computation[waiting.size()]);