[2.0.3] IDE: Executing menu command SaveAs takes too long

Asked by Benjamin Berg on 2020-02-27

2.0.3 , windows 10.

I realized that when clicking "run" it takes like over 1 minute to first execute the script while saved scripts are fast as usual.
This might be acceptable, but also when I click on "save as" in the IDE menu or other commands, the IDE takes like a lot of time to react.
Is that a bug you have filed already? Or is there something wrong with my experience?

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2020-03-07
Last query:
2020-03-07
Last reply:
2020-02-28
Best RaiMan (raimund-hocke) said : #1

On my Win10 machine the first-run delay is less than 1 second.

... and save as works as expected.

run the IDE from commandline

java -jar <path-to>\sikulix.jar -v -c

and watch the debug output.

Benjamin Berg (neuroticnoob) said : #2

The reason was as you said in my other post, that I am using the wrong jdk, when I switched to open JDK 13.0.2 it works fine again.

Benjamin Berg (neuroticnoob) said : #3

Thanks RaiMan, that solved my question.

Benjamin Berg (neuroticnoob) said : #4

just checked:
only the startup works fine, the "save as" still takes around 20-30 seconds .... well...

Benjamin Berg (neuroticnoob) said : #5

The debugging does not work for me...strangely I can open the sikuli203.jar with the Windows UI though...

running cmd as admin:

C:\Users\Ben\Desktop\SIKULI>java -jar sikuli203.jar -v -c
Error: Unable to access jarfile sikuli203.jar

RaiMan (raimund-hocke) said : #6

--- Error: Unable to access jarfile sikuli203.jar

apparently either the jar filename is wrong or it is not located in C:\Users\Ben\Desktop\SIKULI or it is somehow protected

Benjamin Berg (neuroticnoob) said : #7

output - before clicking "save as" in the menu:

"[DEBUG]startUp: IDE: Running: C:\Users\Ben\Desktop\SIKULI\sikulix203.jar
[DEBUG]startUp: IDE: AppData: C:\Users\Ben\AppData\Roaming\Sikulix
[DEBUG]startUp: IDE: starting
[DEBUG]startUp: IDE: no extensions.txt nor valid content
[DEBUG]startUp: IDE: adding extension: C:\Users\Ben\AppData\Roaming\Sikulix\Extensions\jython-standalone-2.7.1.jar
[214 debug] RunTime:temp folder ok: C:\Users\Ben\AppData\Local\Temp\Sikulix_2034237033
Options: *** options dump
Options: testing =
Options: OptionsFile = C:\Users\Ben\AppData\Roaming\Sikulix\SikulixStore\SikulixOptions.txt
Options: *** options dump end
***** show environment for 2.0.3-2020-02-20_13:43 API
user.home: C:\Users\Ben
user.dir (work dir): C:\Users\Ben\Desktop\SIKULI
user.name: Ben
java.io.tmpdir: C:\Users\Ben\AppData\Local\Temp
running 64Bit(amd64) on w (10.0) from a jar
java 13 version 13 vm 13.0.2+8 class 57.0 arch 64
app data folder: C:\Users\Ben\AppData\Roaming\Sikulix
executing jar: C:\Users\Ben\Desktop\SIKULI\sikulix203.jar
*** classpath dump sikulix
  0: sikulix203.jar
*** classpath dump end
***** show environment end
[DEBUG]startUp: IDE: *********************** leaving start
[354 debug] RunTime:***** final cleanup at System.exit() *****
[376 debug] FileManager: deleteFileOrFolder:
C:\Users\Ben\AppData\Local\Temp\Sikulix_2034237033
[52 debug] Sikulix: starting IDE
[81 debug] RunTime:temp folder ok: C:\Users\Ben\AppData\Local\Temp\Sikulix_493592162
Options: *** options dump
Options: testing =
Options: OptionsFile = C:\Users\Ben\AppData\Roaming\Sikulix\SikulixStore\SikulixOptions.txt
Options: *** options dump end
***** show environment for 2.0.3-2020-02-20_13:43 IDE
user.home: C:\Users\Ben
user.dir (work dir): C:\Users\Ben\Desktop\SIKULI
user.name: Ben
java.io.tmpdir: C:\Users\Ben\AppData\Local\Temp
running 64Bit(amd64) on w (10.0) from a jar
java 13 version 13 vm 13.0.2+8 class 57.0 arch 64
app data folder: C:\Users\Ben\AppData\Roaming\Sikulix
executing jar: C:\Users\Ben\Desktop\SIKULI\sikulix203.jar
*** classpath dump sikulix
  0: C:\Users\Ben\Desktop\SIKULI\sikulix203.jar
  1: C:\Users\Ben\AppData\Roaming\Sikulix\Extensions\jython-standalone-2.7.1.jar
*** classpath dump end
***** show environment end
[290 debug] init user preferences
[294 debug] IDE: running with Locale: de_DE
[DEBUG]startUp: IDE: --- Sikuli parameters ---
[DEBUG]startUp: IDE: 1: -v
[DEBUG]startUp: IDE: 2: -c
[310 debug] HotkeyManager: add Capture Hotkey: CTRL+SHIFT 2 (50, 3)
[538 debug] HotkeyManager: add Abort Hotkey: ALT+SHIFT C (67, 9)
[539 debug] IDE: Init ScriptingSupport
[545 debug] IDESupport: enter
[1831 debug] Runner: added: JavaScript [js] text/javascript
[1832 debug] Runner: added: PowerShell [ps1] text/powershell
[1833 debug] Runner: added: SikulixJar [jar] text/jar
[1835 debug] Runner: added: Sikulix [] directory/sikulix
[1836 debug] Runner: added: NetworkRunner [] NET
[1838 debug] Runner: added: Text [txt] text/text
[1839 debug] Runner: added: PackedSikulix [zip] application/zip
[1840 debug] Runner: added: PackedSikulix [skl] text/skl
[1854 debug] Runner: added: Jython [py] text/jython
[1855 debug] Runner: init: class org.sikuli.script.runners.AbstractLocalFileScriptRunner: warning: not possible
[1856 debug] IDESupport: added: Jython
[1856 debug] IDESupport: added: JavaScript
[1857 debug] IDESupport: added: Text
[1857 debug] IDESupport: exit: defaultrunner: Jython (py)
[1862 debug] IDE: Reading Preferences
[1870 debug] Screen: initScreens: starting
[1870 debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment()
[1871 debug] Screen: Accessing: GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()
[1871 debug] Screen: ScreenDevice 0 has (0,0) --- will be primary Screen(0)
[1871 debug] Screen: Monitor 0: (0, 0) 1280 x 1024
[1874 debug] Mouse: init start
[1893 debug] Mouse: init end
[1894 debug] Screen: initScreens: ending
[1895 debug] IDE: Adding components to window
[1912 debug] IDE: [I18N] menuRecent
[1933 debug] IDE: [I18N] menuToolAndroid
[1938 debug] IDE: creating tabbed editor
[2056 debug] IDE: creating message area
[2135 debug] IDE: creating combined work window
[2141 debug] IDE: Putting all together
[2141 debug] IDE: Putting all together - after main pane
[2307 debug] IDE: Putting all together - after toolbar
[2311 debug] IDE: Putting all together - before layout
[2367 debug] IDE: Putting all together - after layout
[2368 debug] IDE: Putting all together - Restore last Session
[2368 debug] IDE: Restore scripts from last session
[2369 debug] IDE: Restore Sikuli script: C:\Users\Ben\Documents\s.sikuli
[2381 debug] EditorPane: created 1583787182851
[2393 debug] EditorPane: loadfile: C:\Users\Ben\Documents\s.sikuli
[2397 debug] JythonRunner: starting initialization
[2400 debug] RunTime:resourceLocation: (class org.sikuli.script.support.RunTime) /Lib/sikuli
[2402 debug] RunTime:resourceList: having jar: jar:file:/C:/Users/Ben/Desktop/SIKULI/sikulix203.jar!/Lib/sikuli
[2427 debug] EditorPane: InitTab: (text/jython)
[2430 debug] SikuliEditorKit.read
[2442 debug] ImagePath: new BundlePath: C:\Users\Ben\Documents\s.sikuli
[2443 debug] EditorPane: setFiles: for: C:\Users\Ben\Documents\s.sikuli
[2553 debug] Image: loaded: 1583609284509.png (file:C:\Users\Ben\Documents\s.sikuli\1583609284509.png)
[2554 debug] Image: cached: 1583609284509.png (61 KB) (# 1 KB 61 -- 0 % of 64 MB)
[2567 debug] Image: loaded: 1583609293102.png (file:C:\Users\Ben\Documents\s.sikuli\1583609293102.png)
[2571 debug] Image: cached: 1583609293102.png (5 KB) (# 2 KB 66 -- 0 % of 64 MB)
[2585 debug] Image: loaded: 1583609306919.png (file:C:\Users\Ben\Documents\s.sikuli\1583609306919.png)
[2589 debug] Image: cached: 1583609306919.png (62 KB) (# 3 KB 128 -- 0 % of 64 MB)
[2595 debug] IDE startup: 2,6 seconds *** Running on Java 9+
[debug] RunTime:files exported: 7 from: Lib/sikuli to:
 C:\Users\Ben\AppData\Roaming\Sikulix\Lib\sikuli
[debug] Jython: added as Jython::sys.path[0]:
C:\Users\Ben\AppData\Roaming\Sikulix\Lib\site-packages
[debug] Jython: ***** sys.path
 0: C:\Users\Ben\Documents\s.sikuli
 1: C:\Users\Ben\AppData\Roaming\Sikulix\Lib\site-packages
 2: C:\Users\Ben\AppData\Roaming\Sikulix\Lib
 3: C:\Users\Ben\AppData\Roaming\Sikulix\Extensions\Lib
 4: C:\Users\Ben\AppData\Roaming\Sikulix\Extensions\jython-standalone-2.7.1.jar\Lib
[7526 debug] JythonRunner: ready: version 2.7.1"

output after pressing "save as":
"[debug] IDE: MenuAction.doSaveAs
[debug] IDE: doSaveAs requested: s.sikuli
[debug] SikulixFileChooser: Save at C:\Users\Ben\Documents" (now UI is frozen for a while - showing no reaction after pressing save as, still having the selection on the menu item)

After User - Input in the save as dialog, saving file under s.sikuli:

"[debug] FileManager: deleteFileOrFolder:
C:\Users\Ben\Documents\s.sikuli
[debug] EditorPane: saveAsBundle: to: C:\Users\Ben\Documents\s.sikuli
[debug] EditorPane: saveAsBundle: from: C:\Users\Ben\Documents\s.sikuli
[debug] FileManager: normalizeAbsolute: file: C:\Users\Ben\Documents\s.sikuli
[debug] FileManager: normalizeAbsolute: file: C:\Users\Ben\Documents\s.sikuli
[debug] EditorPane: setFiles: for: C:\Users\Ben\Documents\s.sikuli
[debug] EditorPane: writeSrcFile: C:\Users\Ben\Documents\s.sikuli\s.py
[debug] EditorPane: cleanBundle
[debug] FileManager: slashify: file: C:/Users/Ben/Documents/s.sikuli
[debug] EditorPane: parseforImages: in C:/Users/Ben/Documents/s.sikuli
[debug] FileManager: slashify: file: 1583609284509.png
[debug] FileManager: slashify: file: 1583609293102.png
[debug] FileManager: slashify: file: 1583609306919.png
[debug] EditorPane: parseforImages finished
[debug] EditorPane: cleanBundle finished
[debug] SikuliEditorKit.read
[debug] Image: reused: 1583609284509.png (file:C:\Users\Ben\Documents\s.sikuli\1583609284509.png)
[debug] Image: reused: 1583609293102.png (file:C:\Users\Ben\Documents\s.sikuli\1583609293102.png)
[debug] Image: reused: 1583609306919.png (file:C:\Users\Ben\Documents\s.sikuli\1583609306919.png)"

RaiMan (raimund-hocke) said : #8

I am sorry, but I cannot reproduce this behavior in my Win10 environment.

After this message:
[debug] SikulixFileChooser: Save at C:\Users\Ben\Documents"

a standard Java javax.swing.JFileChooser is setup and displayed.

Your delay must be somehow created by Java, but I have no idea.