webpack / webpack-sources

Source code handling classes for webpack
MIT License
261 stars 71 forks source link

Performance improvements #76

Closed sokra closed 4 years ago

sokra commented 4 years ago

cache utf-8 conversion allow keeping Buffer instead of string and only convert it lazily expose everything needed for serialization as public methods add optimization step to ConcatSource which converts strings to RawSources (which cache)

codecov[bot] commented 4 years ago

Codecov Report

Merging #76 into master will increase coverage by 4.47%. The diff coverage is 78.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   81.86%   86.34%   +4.47%     
==========================================
  Files          12       12              
  Lines         706      864     +158     
  Branches      160      205      +45     
==========================================
+ Hits          578      746     +168     
+ Misses        128      118      -10
Impacted Files Coverage Δ
lib/ReplaceSource.js 88% <0%> (-2.83%) :arrow_down:
lib/SizeOnlySource.js 88.23% <100%> (+1.56%) :arrow_up:
lib/Source.js 60% <100%> (ø) :arrow_up:
lib/PrefixSource.js 84.48% <45.45%> (-5.91%) :arrow_down:
lib/CachedSource.js 73.61% <56.41%> (-22.14%) :arrow_down:
lib/RawSource.js 83.78% <72.72%> (-16.22%) :arrow_down:
lib/OriginalSource.js 93.44% <77.77%> (-6.56%) :arrow_down:
lib/ConcatSource.js 82.08% <85.71%> (+23.5%) :arrow_up:
lib/SourceMapSource.js 89.92% <91.26%> (+44.24%) :arrow_up:

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 913329a...4e1ea6d. Read the comment docs.