Preamble:
This is not a patch, complaint, question, feature request or plugin bug!
Assumptions:
TRON-DELTA.ORG Xubuntu SE 2018 (X64/AMD64)
Linux v4.15.0 (SMP x86-64)
jEdit v5.5.0 on OpenJDK JRE v1.8.0-191 and OpenJDK 64-Bit Server VM v25.191 mixed mode
Bug Description:
Opening several files at once (1 to ~10 files) works fine, while opening more, e.g. 20, 30, 50 or 100 files at once, takes a long time (approx. 1 second per file) to open them.
For testing the /home/<username>/.jedit/ directory was backed-up and the erased. After starting jEdit with a fresh ~/.jedit directory and default configuration, the issue was still present when opening multiple files at once via the File --> Open. In jEdit version 4.x, opening even 300+ files at once was not an issue and took only a few seconds.</username>
The more files are already opened / registered (BufferSet and EditBus) the longer each additional file open operation takes. With 100+ files the system slowly comes to a halt and 200+ files required me to switch TTY and kill jEdit after 20 minutes.
Logs:
1:08:06 AM [AWT-EventQueue-1] [debug] BufferSet: 515504231 addBufferAt(FileZilla.desktop (~/.desktop/),-1)
1:08:06 AM [AWT-EventQueue-1] [debug] BufferSet: 515504231: Buffer added FileZilla.desktop (~/.desktop/) at 13
1:08:06 AM [AWT-EventQueue-1] [debug] EditBus: BufferUpdate[what=CREATED,view=org.gjt.sp.jedit.View[active],source=FileZilla.desktop (~/.desktop/)]
1:08:06 AM [AWT-EventQueue-1] [debug] EditBus: BufferChanging[what=BUFFER_CHANGING,source=org.gjt.sp.jedit.EditPane[active]]
1:08:06 AM [AWT-EventQueue-1] [debug] EditBus: EditPaneUpdate[what=BUFFER_CHANGED,source=org.gjt.sp.jedit.EditPane[active]]
1:08:06 AM [AWT-EventQueue-1] [debug] EditBus: BufferUpdate[what=LOAD_STARTED,view=org.gjt.sp.jedit.View[active],source=Firefox.desktop (~/.desktop/)]
1:08:06 AM [AWT-EventQueue-1] [debug] BufferSet: 515504231 addBufferAt(Firefox.desktop (~/.desktop/),-1)
1:08:06 AM [AWT-EventQueue-1] [debug] BufferSet: 515504231: Buffer added Firefox.desktop (~/.desktop/) at 14
1:08:06 AM [AWT-EventQueue-1] [debug] EditBus: BufferUpdate[what=CREATED,view=org.gjt.sp.jedit.View[active],source=Firefox.desktop (~/.desktop/)]
1:08:07 AM [AWT-EventQueue-1] [debug] EditBus: BufferChanging[what=BUFFER_CHANGING,source=org.gjt.sp.jedit.EditPane[active]]
1:08:07 AM [AWT-EventQueue-1] [debug] EditBus: EditPaneUpdate[what=BUFFER_CHANGED,source=org.gjt.sp.jedit.EditPane[active]]
1:08:07 AM [AWT-EventQueue-1] [debug] EditBus: BufferUpdate[what=LOAD_STARTED,view=org.gjt.sp.jedit.View[active],source=FontForge.desktop (~/.desktop/)]
1:08:07 AM [AWT-EventQueue-1] [debug] BufferSet: 515504231 addBufferAt(FontForge.desktop (~/.desktop/),-1)
1:08:07 AM [AWT-EventQueue-1] [debug] BufferSet: 515504231: Buffer added FontForge.desktop (~/.desktop/) at 15
1:08:07 AM [AWT-EventQueue-1] [debug] EditBus: BufferUpdate[what=CREATED,view=org.gjt.sp.jedit.View[active],source=FontForge.desktop (~/.desktop/)]
1:08:07 AM [AWT-EventQueue-1] [debug] EditBus: BufferChanging[what=BUFFER_CHANGING,source=org.gjt.sp.jedit.EditPane[active]]
1:08:07 AM [AWT-EventQueue-1] [debug] EditBus: EditPaneUpdate[what=BUFFER_CHANGED,source=org.gjt.sp.jedit.EditPane[active]]
1:08:07 AM [AWT-EventQueue-1] [debug] EditBus: BufferUpdate[what=LOAD_STARTED,view=org.gjt.sp.jedit.View[active],source=Gdebi-GTK.desktop (~/.desktop/)]
1:08:07 AM [AWT-EventQueue-1] [debug] BufferSet: 515504231 addBufferAt(Gdebi-GTK.desktop (~/.desktop/),-1)
1:08:07 AM [AWT-EventQueue-1] [debug] BufferSet: 515504231: Buffer added Gdebi-GTK.desktop (~/.desktop/) at 16
1:08:08 AM [AWT-EventQueue-1] [debug] EditBus: BufferUpdate[what=CREATED,view=org.gjt.sp.jedit.View[active],source=Gdebi-GTK.desktop (~/.desktop/)]
1:08:08 AM [AWT-EventQueue-1] [debug] EditBus: BufferChanging[what=BUFFER_CHANGING,source=org.gjt.sp.jedit.EditPane[active]]
1:08:08 AM [AWT-EventQueue-1] [debug] EditBus: EditPaneUpdate[what=BUFFER_CHANGED,source=org.gjt.sp.jedit.EditPane[active]]
1:08:08 AM [AWT-EventQueue-1] [debug] EditBus: BufferUpdate[what=LOAD_STARTED,view=org.gjt.sp.jedit.View[active],source=GIMP.desktop (~/.desktop/)]
1:08:08 AM [AWT-EventQueue-1] [debug] BufferSet: 515504231 addBufferAt(GIMP.desktop (~/.desktop/),-1)
1:08:08 AM [AWT-EventQueue-1] [debug] BufferSet: 515504231: Buffer added GIMP.desktop (~/.desktop/) at 17
Conclusion/Request:
Since the migration to a new Linux and jEdit version something must have changed for the worse. Hopefully its just my setup and not a general issue.
Therefore, I politely ask the jEdit developers for help with tracking down the issue and reducing load times to a fraction of the current times.
Thanks for your help in advance!
Have you tried the same but without plugins? I'd suspect one of those. Can you start jEdit with the "-noplugin" option? If so, do you see the same issue? If not, could you add your plugins back in one at a time until you see the problem? I would suspect ProjectViewer and Sessions first, although a couple of others might be considered.
Yes, as I said "for testing the /home/<username>/.jedit/ directory was backed-up and the erased. After starting jEdit with a fresh ~/.jedit directory and default configuration, the issue was still present when opening multiple files".</username>
Also, the plugins are stored in the settings directory, as per the jEdit configuration that I set (/home/USERNAME/.jedit/plugins/).
I suspected a plugin, especally Session first as well, but since I use a completely fresh ~/.jEdit directory, I can rule that out, right?
Does any of the devs have other ideas?
Page http://www.jedit.org/index.php?page=compatibility lists several versions of jEdit. Do jEdit 4.x and 5.x equally receive security updates, i.e. are they officially supported branches? If so, I could try a downgrade to v4.x
Page http://www.jedit.org/index.php?page=compatibility also lists Java 5 to 8 for the respective versions. Are there experimental builds in jEdit 5.x and 4.x branch, with OpenJDK 11 (JRE) at this point in time? If so, I could try an upgrade to v11.
Thanks in advance!
You could try to install jvisualvm and do CPU profiling to see what's taking so much time.
For me (debian stretch, i3) it was gnome ATK wrapper that really killed the performance.
See https://stackoverflow.com/questions/47985068/bug-in-gnomes-java-atk-wrapper-how-to-disable-accessibility-for-a-swing-compo for a way to disable it.