Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » Performance issues while replaying a script
Performance issues while replaying a script [message #1728154] Thu, 31 March 2016 11:54 Go to next message
Alexander Koptelov is currently offline Alexander KoptelovFriend
Messages: 10
Registered: December 2015
Junior Member
Hi,

Recently we decided to use RCPTT to compare performance of our product installed in Eclipse 4.2 and 4.5. As a result, some operations (mainly UI related, like opening GMF diagram) were far worse with 4.5 than with 4.2.

Profiling AUT with script replaying reveals that Throwable.getStackTrace() takes much more time in 4.5 than in 4.2.

The problem is in the implementation of TeslaEventManager and ContextManagement.Context classes. When handling Display.syncExec() call TeslaEventManager.syncExecCall() adds context to the list, and TeslaEventManager.syncExecCall() removes it. In case of 4.2 remove() operation doesn't take much time since mostly there is only one context in the list, and it can be found and removed by reference equality. But in 4.5 there is an extra event handler (org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler, apart from only org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(Event) in 4.2) that also invoke Display.syncExec(). As a result, most of the time removal is performed over list containing 2 or 3 contexts. Thus search is performed basing on context stack traces, and getting stack trace is not very fast operation. Consider the amount of invocation (over 280000 in 4.5 vs 20000 in 4.2) and the performance glitch becomes obvious.

I haven't performed full analysis, but from TeslaEventManager's point of view there is no need in comparing contexts basing on stack traces -- a context is created in the 'around' advice, and exactly this instance should be removed after syncExec is done. So I'd suggest removing equals() and hashCode() from ContextManagement.Context class. Alternatively, if there are places where contexts should be definitely matched by stack traces, explicit iteration over array could be used with '==' comparison.

BTW, is it possible to minimize AUT instrumentation for performance testing? I believe the most of it is used for recording, not replaying.
Re: Performance issues while replaying a script [message #1728530 is a reply to message #1728154] Tue, 05 April 2016 08:23 Go to previous messageGo to next message
Andrey Sobolev is currently offline Andrey SobolevFriend
Messages: 75
Registered: February 2015
Member
Hi,

Thanks a lot, Pushed a small fix for 2.1-SNAPSHOTs.
Please let me know if you will find any other performance issues Smile

Best regards,
Andrey.
Re: Performance issues while replaying a script [message #1728544 is a reply to message #1728530] Tue, 05 April 2016 10:22 Go to previous message
Alexander Koptelov is currently offline Alexander KoptelovFriend
Messages: 10
Registered: December 2015
Junior Member
Hi Andrey,

Thanks for responding.
Did you consider reimplementing functionality that depends on getStackTrace() using aspects? Not sure about overall context functionality, but at least some conditions that are calculated basing on them and getRunnableName() can be implemented by advises.

Regards,
Alex
Previous Topic:I cannot set a text value
Next Topic:Getting error when on running test using Test Runner with ant
Goto Forum:
  


Current Time: Fri Apr 26 16:26:57 GMT 2024

Powered by FUDForum. Page generated in 0.02824 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top