Skip to content

Conversation

@SukkaW
Copy link
Member

@SukkaW SukkaW commented Oct 9, 2025

What does it do?

We don't necessarily need to calculate all potentially available fields of the permalink in advance. I myself never use hash or any dates in my permalink.

We should not have to deal with moment.js or sha1 overhead. We can actually calculate those expensive fields on demand.

I use foxts because I happen to have this exist in my util library. But I can always copy the implementation to hexo-util if needed.

Screenshots

Pull request tasks

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

@SukkaW SukkaW requested a review from D-Sketon October 9, 2025 17:43
@github-actions
Copy link

github-actions bot commented Oct 9, 2025

How to test

git clone -b perf-on-demand-post-metadata https://github.com/SukkaW/hexo.git
cd hexo
npm install
npm test

@SukkaW SukkaW force-pushed the perf-on-demand-post-metadata branch from dcc54bd to 12976b8 Compare October 9, 2025 17:45
@D-Sketon
Copy link
Member

It looks like hexo-util's Permalink also needs modification, so may be a good time to incorporate the optimizations into hexo-util?

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