| Summary: | UIProcess is slowing down, when start-method is called several times in a row | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Riena | Reporter: | Steffen Kriese <steffen.kriese> | ||||||
| Component: | Core | Assignee: | Project Inbox <riena.core-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | ||||||||
| Version: | 3.0.0 | ||||||||
| Target Milestone: | 3.0.0 | ||||||||
| Hardware: | PC | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Steffen Kriese
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 |