Community
Participate
Working Groups
We changed the behavior of the UIProcess so it can be started multiple times in a row and the UIProcess checks, if the job is already scheduled and does nothing. This doesn't work properly, because if the start-method of a UIProcess is called like 50 times in a row, the execution hangs for about 1-2 seconds and gets slower with every additional execution. This was introduced with revision 1.32 on 2.5.2011 in the UIProcess-class.
Created attachment 197567 [details] Patch to reporoduce the behavior with the SWT Exampleclient steps to reproduce: - apply patch - start SWT ExampleClient - go to Playground => UIProcess - switch between SubModules Demo_1 and uiProcess_2 for at least 40 times
After profiling the SWT Exampleclient I found out, that the method StatuslineUIProcessRidget.ContextUpdateListener.contextUpdated() was called more than 200 000 times when switching about 50 times between the 2 SubModules. I am not sure what this method does, but it's called way to often ;-) Also in the method StatuslineUIProcessRidget.observeContext() the contextUpdateListener was created and registered for every call. So the list of listeners grows with every execution. That doesn't seem right as well. I fixed this by adding a check in the NodeEventDelegation.addContextUpdateListener() method, where the listener is registered. This helped reducing the calles to contextUpdated(), but I dont't know if this fix would break anything else, so I will add a patch to reproduce this.
Created attachment 197691 [details] Patch for Riena Adds some debug statements and reduces the amount of listeners registered in NodeEventDelegation.
Fixed in HEAD