Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Use Arc for CompiledClass variants #875

@Oppen

Description

@Oppen

Currently services::api::contract_classes::CompiledClass contains two variants:

pub enum CompiledClass {
    Deprecated(Box<ContractClass>),
    Casm(Box<CasmContractClass>),
}

Both currently use Box, we should change them to use std::sync::Arc.
These get copied most of the time between the caches and their users, and are essentially read only.
Thus, it would be much cheaper to share them. This will have low immediate effect on performance but will make future work more feasible.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions