Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Optimized regex parser for Curl dependency manager #19

Merged
merged 4 commits into from
Apr 12, 2023

Conversation

pavsorab
Copy link
Contributor

@pavsorab pavsorab commented Apr 7, 2023

Fixes :

  • Removed the capturing group that matches an optional text before curl (?:\S+[ \t])? which was causing slowness.
  • Removed the capturing group that matches the options and flags (-.* and \S+). Hence minimised use of greedy quantifier.
  • Changed the capturing group that matches the URL to (\S+) to only capture the URL itself.

Miscellaneous fix :

  • Fixed a typo for wget test data in automated functional test

Pavan Sorab added 2 commits April 7, 2023 12:05
Signed-off-by: Pavan Sorab <psorab@vmware.com>
Signed-off-by: Pavan Sorab <psorab@vmware.com>
code/parsers/curl.py Outdated Show resolved Hide resolved
Copy link
Contributor

@loredous loredous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall code looks clean. Please make changes to avoid the mentioned exception/failure.

@loredous loredous self-assigned this Apr 7, 2023
Pavan Sorab added 2 commits April 10, 2023 16:02
Signed-off-by: Pavan Sorab <psorab@vmware.com>
Signed-off-by: Pavan Sorab <psorab@vmware.com>
Copy link
Contributor

@loredous loredous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks good with latest changes. Approving for merge

@pavsorab pavsorab merged commit 7ec7724 into main Apr 12, 2023
@loredous loredous deleted the curl-optimize-regex branch June 8, 2023 18:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants