-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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: replace concatMap to flatMapSequential to improve parallelism and efficiency #6706
Conversation
54ae723
to
4cbfd36
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6706 +/- ##
============================================
- Coverage 58.17% 56.99% -1.18%
- Complexity 3947 3978 +31
============================================
Files 680 713 +33
Lines 23262 24009 +747
Branches 1582 1572 -10
============================================
+ Hits 13532 13685 +153
- Misses 9106 9712 +606
+ Partials 624 612 -12 ☔ View full report in Codecov by Sentry. |
application/src/main/java/run/halo/app/extension/router/ExtensionCompositeRouterFunction.java
Outdated
Show resolved
Hide resolved
application/src/main/java/run/halo/app/plugin/DefaultPluginRouterFunctionRegistry.java
Outdated
Show resolved
Hide resolved
4c09b16
to
e21825e
Compare
e21825e
to
9a24818
Compare
application/src/main/java/run/halo/app/theme/dialect/GlobalHeadInjectionProcessor.java
Outdated
Show resolved
Hide resolved
application/src/main/java/run/halo/app/theme/dialect/TemplateFooterElementTagProcessor.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JohnNiang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Quality Gate passedIssues Measures |
What type of PR is this?
/kind improvement
/area core
/milestone 2.20.x
What this PR does / why we need it:
将 concatMap 替换为 flatMapSequential 以提高并行度和执行效率
可以看一下这个场景示例来模拟像文章列表 API 的数据组装
假如每个步骤的执行时间是 1s 有 4 个步骤 同时 Flux 发出 4 条数据:
结果:
Does this PR introduce a user-facing change?