Skip to content

perf: match filename placeholders with regular expression #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kevinchappell
Copy link
Contributor

@kevinchappell kevinchappell commented Apr 20, 2019

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Currently filename option is checked 3 times for the existence of 3 different strings, this PR replaces the 3 filename.includes(x) with a single regular expression test for a small boost in performance.

image

Breaking Changes

None

Additional Info

@codecov
Copy link

codecov bot commented Apr 22, 2019

Codecov Report

Merging #383 into master will decrease coverage by 0.17%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #383      +/-   ##
==========================================
- Coverage   65.11%   64.93%   -0.18%     
==========================================
  Files           4        4              
  Lines         407      405       -2     
  Branches       82       82              
==========================================
- Hits          265      263       -2     
  Misses        118      118              
  Partials       24       24
Impacted Files Coverage Δ
src/index.js 87.79% <100%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44d00ea...b98db67. Read the comment docs.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Thanks!

@alexander-akait alexander-akait merged commit b0a0355 into webpack-contrib:master Apr 23, 2019
@kevinchappell kevinchappell deleted the refactor/filename-placeholders branch May 27, 2019 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants