texstudio-org/texstudio

Slow initial search operation in PDF viewer

Open

#2,171 opened on Mar 22, 2022

 (2 comments) (0 reactions) (0 assignees)C++ (397 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (3,516 stars)
PR merge metrics
 (Avg merge 5h 26m) (19 merged PRs in 30d)

Description

Environment

TeXstudio: 4.2.2 Qt: 5.15.2 OS: Windows 10 TeX distribution: miktex poor response as soon as I enter a character no movement in the PDF view when it is again responsive to my entry, the edit box content updates, but no search appears to commence How to reproduce Search in the PDF for anything. Every attempt I have made fails, as described. The viewer seems fine as viewer. It appears to be only the search which is broken.

Expected behavior

The PDF viewer should locate the first occurrence of my target word

Actual behavior

poor response as soon as I enter a character no movement in the PDF view when it is again responsive to my entry, the edit box content updates, but no search appears to commence How to reproduce Search in the PDF for anything. Every attempt I have made fails, as described. The viewer seems fine as viewer. It appears to be only the search which is broken.

How to reproduce

I have created a project using the Lorem ipsum generator, and it exhibits the problem. A zipped file is attached. TestKaoBook.zip

  1. Build the document.
  2. Go to the PDF Viewer.
  3. Go to top of document.
  4. Search: TYPE in the word: "placerat" (do not paste from the text)

The problem appears to manifest because the search is triggered as soon as a character is typed. As the document is about 470 pages, the search is large enough to take some time. I see no need for a screencast. The key to this seems to be the length of the document. And as it defaults to searching for a word, and the single character will not be found, then it will have to search the entire text before the edit box is again enabled. Once a search word has been entered, then the search action works fine. Likewise, if a word is pasted to the edit box, it works fine.

Contributor guide