Skip to content
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

perf(meta_generator): avoid unnecessary check #4208

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

SukkaW
Copy link
Member

@SukkaW SukkaW commented Mar 30, 2020

What does it do?

This PR is mean to supersede #4070 and #4078.

With cached value NEED_INJECT, all the checks will be only executed once.

How to test

git clone -b meta_generator_optimize https://github.com/sukkaw/hexo.git
cd hexo
npm install
npm test

Screenshots

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

@SukkaW
Copy link
Member Author

SukkaW commented Mar 30, 2020

According to the benchmark, the generation duration dropped by 3% after this PR.

Copy link
Member

@yoshinorin yoshinorin left a comment

Choose a reason for hiding this comment

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

LGTM :)

@stevenjoezhang stevenjoezhang linked an issue Apr 1, 2020 that may be closed by this pull request
2 tasks
@SukkaW SukkaW merged commit 2866dca into hexojs:master Apr 1, 2020
@SukkaW SukkaW mentioned this pull request Jul 25, 2020
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Cache to determine if filter is enabled
3 participants