Don't inline query_cache_hit to reduce code size of the query hot path.
This commit is contained in:
parent
e7813fee92
commit
e60ccfc6a9
@ -393,7 +393,7 @@ pub fn query_provider(&self) -> TimingGuard<'_> {
|
||||
}
|
||||
|
||||
/// Record a query in-memory cache hit.
|
||||
#[inline(always)]
|
||||
#[inline(never)]
|
||||
pub fn query_cache_hit(&self, query_invocation_id: QueryInvocationId) {
|
||||
self.instant_query_event(
|
||||
|profiler| profiler.query_cache_hit_event_kind,
|
||||
|
@ -722,7 +722,9 @@ fn ensure_must_run<Q, Qcx>(qcx: Qcx, key: &Q::Key) -> (bool, Option<DepNode<Qcx:
|
||||
}
|
||||
Some((_, dep_node_index)) => {
|
||||
dep_graph.read_index(dep_node_index);
|
||||
qcx.dep_context().profiler().query_cache_hit(dep_node_index.into());
|
||||
if std::intrinsics::unlikely(qcx.dep_context().profiler().enabled()) {
|
||||
qcx.dep_context().profiler().query_cache_hit(dep_node_index.into());
|
||||
}
|
||||
(false, None)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user