Bug 485339 - Action takes 10s in RCPTT tests compared to <50ms in runtime due to org.eclipse.ui.IEditorSite.registerContextMenu
Summary: Action takes 10s in RCPTT tests compared to <50ms in runtime due to org.ecli...
Status: UNCONFIRMED
Alias: None
Product: RCPTT
Classification: Technology
Component: Runtime (show other bugs)
Version: 2.0.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 2.0.2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-07 07:41 EST by Krzysztof Jozefowicz CLA
Modified: 2017-04-28 06:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof Jozefowicz CLA 2016-01-07 07:41:08 EST
RED Robot Editor is tool for editing Robot Framework testcases.

Our functional tests are done with RCPTT, we recognized that there is a big delay while opening editor under RCPTT tests compared to standard RED usage.
This leads to longer test execution (now full tests last ~1h) which could be reduced more than 30% if delay would be non-existent. 

In summary, anytime RCPTT clicks on file to open it in RED editor, whole RED freeze for around 7-10s (around 7s on Eclipse Luna, 10s on Mars regardless Windows/Linux) which is unseen while using RED. While recording such delay does not happens also.


Profiling showed that org.eclipse.ui.IEditorSite.registerContextMenu method causes delay. 

RED can be found at GitHub: https://github.com/nokia/RED/releases

We are unable to figure out what RCPTT is waiting for, could you have a look from your side? 

below is a RCPTT script to reproduce delay, before run, install RED to eclipse.

--##--

// change perspective to Robot
get-menu "Window/Open Perspective/Other..." | click
with [get-window "Open Perspective"] {
    get-table | select Robot
    get-button OK | click
}
// create Robot Project
get-view "Project Explorer" | get-tree | get-menu "New/Robot Project" | click
with [get-window "New Robot project"] {
    get-editbox -after [get-label "Project name:"] | set-text testproject
    get-button Finish | click
}
// Create sample robot file
get-view "Project Explorer" | get-tree | select testproject | get-menu "New/Robot Test Suite" | click
with [get-window "New Robot Test Suite"] {
    get-editbox -after [get-label "File name:"] | set-text testfile
    get-button Finish | click
}
// close file
get-editor "testfile.robot" | close

// open and close file two times
get-view "Project Explorer" | get-tree | select "testproject/testfile.robot" | double-click
get-editor "testfile.robot" | close
get-view "Project Explorer" | get-tree | select "testproject/testfile.robot" | double-click
get-editor "testfile.robot" | close
Comment 1 Krzysztof Jozefowicz CLA 2017-04-28 06:12:29 EDT
Have you even tried to reproduce it with example from first comment?