Searching File Via Ctrl+F Is Very Slow

Open
#474 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp

Research direction

Reproduce the issue in XmlNotepad by loading a roughly 5 MB file, opening the XSL Output tab, and searching with Ctrl+F for “Example.” The issue names no source file or test, so trace the search path from that interaction; done means typing a query no longer makes the application unresponsive while searching each prefix.

Written by the indexing model from the issue text.

Description

I'm not sure what the proper course of action for something like this is (or if it's really even an issue for most), but the issue is as follows:

I have a ~5mb file that when searched via Ctrl+F becomes unresponsive for the first few characters because it's trying to immediately give me results for each character as I type it. I don't need to know where all of the 'A's are in the file, but it's delaying my search because it's going to try to find them all anyway.

Example:
Open XmlNotepad > Load File > Move to XSL Output Tab
Press Ctrl+F > Begin Typing "Example"
Program hangs on the first 'E' until it's searched the entire document for 'E', then I need to type to the next letter.
It does get quicker with each letter since it has the added context of only looking for strings that begin with an 'E', but it does inhibit workflows when having to wait.

I'm sorry if this isn't the proper place to put something like this, but thank you all the same.

Dominant language
C#
Stars
1.2k
Forks
240
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/XmlNotepad

All issues in microsoft/XmlNotepad

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.