Class: Rigor::Cache::RbsEnvironment
- Inherits:
-
RbsCacheProducer
- Object
- RbsCacheProducer
- Rigor::Cache::RbsEnvironment
- Defined in:
- lib/rigor/cache/rbs_environment.rb
Overview
Cache producer that materialises the entire RBS::Environment (the loader's build_env result) and
round-trips it through Marshal against the patched RBS::Location (see
RbsEnvironmentMarshalPatch).
Cold runs pay the full RBS::EnvironmentLoader#load + RBS::Environment.from_loader + resolve_type_names cost once; warm runs (and a separate loader sharing the same Store) load the
marshalled blob and skip the parse / resolve stages entirely. The RbsConstantTable,
RbsKnownClassNames, RbsClassAncestorTable, and RbsClassTypeParamNames caches still live alongside
this producer — their cached values are reached without re-touching env, but when an uncached lookup
happens (instance_method, singleton_method, …) the env produced here is what answers it.
Cache descriptor shape is shared with every other cache producer that depends on the RBS environment — see Rigor::Cache::RbsDescriptor.build.
Constant Summary collapse
- PRODUCER_ID =
"rbs.environment"