hono icon indicating copy to clipboard operation
hono copied to clipboard

feat(ssg): generate files concurrently

Open usualoma opened this issue 1 year ago • 1 comments

Continued from #2169.

Deletion of Commit

I've divided detailed topics into separate PRs and issues.

  • #2186
  • https://github.com/honojs/hono/issues/2175
    • https://github.com/honojs/hono/pull/2174
    • https://github.com/honojs/hono/pull/2178

The default number of concurrency in SSG is 2.

The default value is debatable, but for this PR it was set to 2. The reasons are as follows.

  • Even at 2 (or 1), this PR will parallelize writes to the file system, which is expected to be a sufficient speed improvement over the current main
  • When calling external APIs, it is not good if the default is too large

Users can easily specify their own values with concurrency, so a small default is fine.

Author should do the followings, if applicable

  • [x] Add tests
  • [x] Run tests
  • [x] yarn denoify to generate files for Deno

usualoma avatar Feb 10 '24 00:02 usualoma

My work is done.

If there is enough discussion in #2169 to form a consensus on the implementation policy, I think we can merge in this PR content.

usualoma avatar Feb 10 '24 07:02 usualoma

It seems to have been CLOSED by some accident.

watany-dev avatar Feb 25 '24 14:02 watany-dev

@watany-dev

Thanks for the notice.

@usualoma

I've checked this again and run this real situation; it works well. I'd like to merge this, so please merge the "next".

yusukebe avatar Feb 25 '24 15:02 yusukebe

@yusukebe merged!

usualoma avatar Feb 26 '24 00:02 usualoma

@usualoma

Thanks! Merging now.

yusukebe avatar Feb 26 '24 07:02 yusukebe