This repository has been archived by the owner on Sep 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
perf(executor): use inner call instead of service dispatcher #365
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KaoImin
requested review from
zeroqn
and removed request for
rev-chaos and
zhouyun-zoe
July 20, 2020 03:12
Add describe |
/test all |
I think you should define a
pub trait MetadataService {
fn get(&self) -> Metadata;
fn update(&mut self, metadata: Metadata);
}
#[service]
impl NormalMetadataService {
#[read]
// the function can be called with transaction
fn get_metadata() -> Metadata { self.get() }
}
impl NormalMetadataService for MetadataService {
// the function can be called only each other services
fn get() -> Metadata { ... }
// Now, we has a safety calling way on updating metadata that don't need rewrite metadata.
fn update(&mut self) -> { ... }
}
ping @KaoImin |
yejiayu
reviewed
Jul 21, 2020
KaoImin
changed the title
refactor(executor): use inner call instead of service dispatcher
perf(executor): use inner call instead of service dispatcher
Jul 21, 2020
yejiayu
suggested changes
Jul 21, 2020
KaoImin
force-pushed
the
inner_call
branch
4 times, most recently
from
July 22, 2020 04:56
abbdfc2
to
de91d59
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yejiayu 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 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
perf
What this PR does / why we need it:
SDKFactory
trait to cache SDKs of each service at the beginning of executing a block.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: