Skip to content

Use template to reduce the repeated creation and serialization in align by device query#11595

Merged
JackieTien97 merged 4 commits intomasterfrom
beyyes/use_template_accelerate
Nov 23, 2023
Merged

Use template to reduce the repeated creation and serialization in align by device query#11595
JackieTien97 merged 4 commits intomasterfrom
beyyes/use_template_accelerate

Conversation

@Beyyes
Copy link
Copy Markdown
Member

@Beyyes Beyyes commented Nov 22, 2023

Description

In this pr, I extract all common variables in align by device query (and all queried devices are set in one template) to a class named TemplateInfo. So in LogicalPlan, DistributedPlan and Schedule step, we can use this structure to accelerate the construction, avoiding repeated creation and serialization.

Before optimization:
schedule: 5000ms

After optimization:
schedule: 700ms

img_v3_025f_ba0dd588-70cb-422f-a645-c701ade114bg

@Beyyes Beyyes changed the title Use template to accelerate the performance of serialization Use template to reduce the repeated creation and serialization in align by device query Nov 22, 2023
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Attention: 179 lines in your changes are missing coverage. Please review.

Comparison is base (3ca454e) 49.02% compared to head (775de87) 48.98%.

Files Patch % Lines
...tdb/db/queryengine/plan/analyze/TemplatedInfo.java 0.00% 108 Missing ⚠️
...lanner/plan/node/source/AlignedSeriesScanNode.java 0.00% 21 Missing ⚠️
...otdb/db/queryengine/plan/analyze/TypeProvider.java 21.05% 15 Missing ⚠️
...queryengine/plan/planner/TemplatedLogicalPlan.java 0.00% 10 Missing ⚠️
...b/queryengine/plan/planner/plan/node/PlanNode.java 0.00% 10 Missing ⚠️
...db/queryengine/plan/planner/plan/PlanFragment.java 52.94% 8 Missing ⚠️
...eryengine/plan/planner/plan/node/PlanNodeType.java 20.00% 4 Missing ⚠️
...ueryengine/plan/planner/OperatorTreeGenerator.java 71.42% 2 Missing ⚠️
.../evolvable/request/PipeTransferTabletBatchReq.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #11595      +/-   ##
============================================
- Coverage     49.02%   48.98%   -0.04%     
- Complexity    24872    24876       +4     
============================================
  Files          2799     2800       +1     
  Lines        175254   175403     +149     
  Branches      21052    21076      +24     
============================================
+ Hits          85912    85921       +9     
- Misses        89342    89482     +140     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sonarqubecloud
Copy link
Copy Markdown

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 5 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@JackieTien97 JackieTien97 merged commit 8970842 into master Nov 23, 2023
@JackieTien97 JackieTien97 deleted the beyyes/use_template_accelerate branch November 23, 2023 02:12
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.

3 participants