[jedit:bugs] #4135 Slow HyperSearch Performance on macOS with Large Files and Queries

Matthew Orzewalla via jEdit-devel <[email protected]> Sun, 11 Aug 2024 21:29:42 -0000
Newsgroups gmane.editors.jedit.devel
Message-ID </p/jedit/bugs/4135/82efc2e0cc7ecd6bdb6565d9f094cf94a11c7077.bugs@jedit.p.sourceforge.net>
With the release of jEdit 5.7, I tried the process again. i installed jEdit 5.7 on Windows 10 using Temurin 21 (let me know if the details are needed; I am not in front of the Windows machine at the moment), and HyperSearch works as expected for the test file for searching "death", "from", or "the".

I tested jEdit 5.7 on an ARM Mac using Temurin 22 (on Windows I did not realize that Temurin 22 was the latest release) and I am still observing a sustained beachball when searching "the". I did try turing off the Text Color and Background Color checkboxes within the HyperSearch Style Editor, and I think that may have sped up performance when searching "from", but the search still had issues searching the word "the".

Since the original post, I noticed that Isabelle2024 was released here: https://isabelle.in.tum.de. When performing the same proceedure with the Isabelle2024 (jEdit 5.6 under the covers) HyperSearch works as expected (taking maybe a couple seconds to populate the HyperSearch results for "the"). 

Isabelle uses the Azul Systems Java 21 virtual machine  built-in to the install. I tried changing the macOS Java vurtual machine to Azul Systems Java 21, but got the same anomolous result for jEdit 5.7.

I would use Isabelle2024 going forward, but I do like the better macOS integration available in jEdit 5.7. :)


---

**[bugs:#4135] Slow HyperSearch Performance on macOS with Large Files and Queries**

**Status:** open
**Group:** normal bug
**Created:** Sat May 25, 2024 12:31 AM UTC by Matthew Orzewalla
**Last Updated:** Sat May 25, 2024 12:31 AM UTC
**Owner:** nobody
**Attachments:**

- [activity.log](https://sourceforge.net/p/jedit/bugs/4135/attachment/activity.log) (17.4 kB; application/octet-stream)


I have been observing slow hypersearch performanc on macOS for a while now, but wanted to wait for a preview of 5.7 to see if performance improved.

From what I can tell, it began with the switch to Java 11, but I'm not positive that is the root cause. The bug has been observed on both Intel Macs and ARM Macs

Steps I use to reproduce:
1.  Download the plain text copy of Death Valley in '49 from Project Gutenberg here: https://www.gutenberg.org/ebooks/12236.txt.utf-8
2.  Install and start up a fresh version jEdit 5.7pre (no prexisting jEdit user directory) from the version posted in this thread: https://sourceforge.net/p/jedit/bugs/4123/. On my system java-version lists: 
openjdk version "21.0.2" 2024-01-16 LTS
OpenJDK Runtime Environment Temurin-21.0.2+13 (build 21.0.2+13-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (build 21.0.2+13-LTS, mixed mode)
3.  Open the text file (pg12236.txt from the download on my system) in jEdit
4.  Perform a search with Ignore Case and HyperSearch selected of the word "death". The 106 results should be returned fairly quickly
5.  Perform a search for the word "from". The 625 results will eventually be returned, but it beachballs my system for about 50 seconds.

Performing a search for the word "the" beachballs my system for longer than I am willing to wait.

I can perform a search of the same file for the word "the" on a Windows install of jEdit and return the 15,733 results in less than 3 seconds (the Windows About jEdit screen lists, "jEdit 5.5.0 server mode, using Oracle Corporation Java 1.8.0_391).

I am uploading the activity.log file., but I didn't see anything indicating the slow performance within the file.

Let me know if there is any other information I can provide that can help diagnose the root cause. At first I had thought that it had something to do with docking or undocking the HyperSearch window (with docked causing slow performance), but then I went back and did some dedicated testing and found that it is slow undocked as well. It also seems that if I do more searches and work my way up to larger returns that the slowness subsides, as if it is slow allocating memory to the process, but once that memory gets allocated it is no longer slow.

Thank you for your help in this matter.


---

Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/jedit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.

-- 
-----------------------------------------------
jEdit Developers' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-devel