Skip to content

Conversation

@gxcsoccer
Copy link
Member

@gxcsoccer gxcsoccer commented Apr 8, 2019

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

优化前

byte: 55.795ms

优化后

byte: 3.092ms

const importLazy = require('import-lazy')(require);
const Long = importLazy('long');
const numbers = require('./number');
const utility = require('utility');
Copy link
Member Author

Choose a reason for hiding this comment

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

utility 加载要几十毫秒

@codecov
Copy link

codecov bot commented Apr 8, 2019

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%) ⬆️

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.

1 similar comment
@codecov
Copy link

codecov bot commented Apr 8, 2019

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%) ⬆️

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.

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