Commit 2655fd6
Replace RunnableChain in DeferredUpdateManager with List - Bug 281327
In the class org.eclipse.draw2d.DeferredUpdateManager, Runnables are
queued using a special inner class RunnableChain which basically
produces a linked list of Runnables. When run is called on the head of
the linked list, first run of its next element is called an then run on
the runnable of the element itself.
This produces very large stacks, for each element in the list, a new
stack frame is created. Instead of the RunnableChain construct, a simple
ArrayList can be used as queue which will be faster and use less
memory.1 parent 44d9ebe commit 2655fd6
File tree
1 file changed
+8
-25
lines changed- org.eclipse.draw2d/src/org/eclipse/draw2d
1 file changed
+8
-25
lines changedLines changed: 8 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 63 | | |
81 | 64 | | |
82 | 65 | | |
| |||
195 | 178 | | |
196 | 179 | | |
197 | 180 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
203 | 186 | | |
204 | 187 | | |
205 | 188 | | |
| |||
330 | 313 | | |
331 | 314 | | |
332 | 315 | | |
333 | | - | |
| 316 | + | |
334 | 317 | | |
335 | 318 | | |
336 | 319 | | |
| |||
0 commit comments