Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
d0703258
Unverified
Commit
d0703258
authored
Jan 13, 2021
by
Sergey Pepyakin
Committed by
GitHub
Jan 13, 2021
Browse files
Avoid inlining `update_config_member` (#2246)
Closes #2241
parent
05482b5b
Pipeline
#120003
passed with stages
in 29 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
runtime/parachains/src/configuration.rs
View file @
d0703258
...
@@ -652,6 +652,11 @@ impl<T: Config> Module<T> {
...
@@ -652,6 +652,11 @@ impl<T: Config> Module<T> {
}
}
}
}
// NOTE: Explicitly tell rustc not to inline this because otherwise heuristics note the incoming
// closure making it's attractive to inline. However, in this case, we will end up with lots of
// duplicated code (making this function to show up in the top of heaviest functions) only for
// the sake of essentially avoiding an indirect call. Doesn't worth it.
#[inline(never)]
fn
update_config_member
(
fn
update_config_member
(
updater
:
impl
FnOnce
(
&
mut
HostConfiguration
<
T
::
BlockNumber
>
)
->
bool
,
updater
:
impl
FnOnce
(
&
mut
HostConfiguration
<
T
::
BlockNumber
>
)
->
bool
,
)
{
)
{
...
...
gabriel klawitter
🏄
@gabriel
mentioned in commit
4ca82220
·
Jan 13, 2021
mentioned in commit
4ca82220
mentioned in commit 4ca822207cb3cfc40dbf088c5b45a779da70c70b
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment