chore: refactored TimedMatch to use Worker Thread for performance improvement #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



This pull request introduces a significant refactor to the regex matching strategy, replacing the use of child processes with Node.js worker threads for improved performance and reliability. It also removes unnecessary asynchronous code from the strategy processing and updates related tests to use synchronous logic. The most important changes are grouped below:
TimedMatch Regex Matching Refactor
TimedMatchwith a worker threads implementation, usingSharedArrayBufferand atomics for communication and timeout control. The worker is now initialized and terminated via explicit static methods. (src/helpers/timed-match/index.js,src/helpers/timed-match/match-proc.js,src/helpers/timed-match/match.js) [1] [2] [3] [4]TimedMatchworker at startup. (src/app.js)Removal of Unnecessary Async/Await
async/awaitfromprocessOperation,processREGEX,checkStrategy, and related functions. (src/models/config-strategy.js,src/services/criteria.js) [1] [2] [3] [4] [5] [6]Test Suite Updates
TimedMatchworker, clear the blacklist before tests, and remove allasync/awaitfrom test cases to match the new synchronous API. (tests/unit-test/config-strategy.test.js) [1] [2] [3] [4]Minor Configuration Change
src/helpers/cache/worker.jsfrom the SonarQube exclusions insonar-project.properties, ensuring this file is now included in code quality analysis. (sonar-project.properties)