byte icon indicating copy to clipboard operation
byte copied to clipboard

refactor: enhance require profermance

Open gxcsoccer opened this issue 6 years ago • 2 comments

console.time('byte');
require('byte');
console.timeEnd('byte');

优化前

byte: 55.795ms

优化后

byte: 3.092ms

gxcsoccer avatar Apr 08 '19 17:04 gxcsoccer

Codecov Report

Merging #36 into master will increase coverage by 0.06%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
+ Coverage   94.26%   94.32%   +0.06%     
==========================================
  Files           2        2              
  Lines         366      370       +4     
==========================================
+ Hits          345      349       +4     
  Misses         21       21
Impacted Files Coverage Δ
lib/byte.js 94.3% <100%> (+0.06%) :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 4c73cb0...23ab4d0. Read the comment docs.

codecov[bot] avatar Apr 08 '19 17:04 codecov[bot]

Codecov Report

Merging #36 into master will increase coverage by 0.06%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
+ Coverage   94.26%   94.32%   +0.06%     
==========================================
  Files           2        2              
  Lines         366      370       +4     
==========================================
+ Hits          345      349       +4     
  Misses         21       21
Impacted Files Coverage Δ
lib/byte.js 94.3% <100%> (+0.06%) :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 4c73cb0...23ab4d0. Read the comment docs.

codecov[bot] avatar Apr 08 '19 17:04 codecov[bot]