apache / apache/netbeans

Some regexps make it difficult to cancel a search

Open
#7,175 3 comments 0 reactions 0 assignees View on GitHub
Contribution welcome kind:feature needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Description

Currently, search can be canceled using the red "Stop Search" button, but at least using regex search, the cancel action is not processed immediately and it seems Netbeans waits until the currently searched file is processed completely.

Reproducible with `".*,.*,.*,.*,.*,13,.*,.*,.*,.*,.*,.*"` slow regex basically on any larger codebase.

### Use case/motivation

When a complex regex is used on a large file, the current solution is to restart Netbeans to cancel the search operation. This is of course unacceptable for regular work.

### Related issues

_No response_

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the slow regex search in NetBeans using the example pattern on a large codebase, then trace the Stop Search cancellation path. Done means cancellation interrupts processing promptly instead of waiting for the current file or requiring a restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop-dev, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.