Skip to content

Feature Suggestion: Run RegExp Tester in Web Worker to prevent thread hangs #23

Description

@omartuhintvs

Problem

In src/components/RegexpTester.tsx, the RegExp validation and execution run directly on the main thread via [...testString.matchAll(regex)].

If a user enters a regex that isn't configured globally (g flag missing) or hits catastrophic backtracking, the browser's main execution thread freezes completely, hanging the UI.

Suggestion

Isolate regex matches inside a Web Worker. If execution takes more than 500ms, terminate the worker and return a timeout warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions