Skip to content

Feature request: Allow all vars to be reset in an existing VM #499

Open
@gotwarlost

Description

@gotwarlost

Based on the comment @sbarzowski made in a different conversation that only the value cache of a VM is affected when variables are changed but not the import AST cache, it led me to think that maybe qbec should be re-using VMs from a pool and not creating them on demand such that existing import caches in the VMs created can provide performance boosts.

For this to work I need a way to clear all variables (TLAs, extvars etc.) since the set of variables is not consistent across VM use. Currently, I think there is no way to do this. Probably a method like ResetVars() on the VM instance which blanks out the exts, tlas and nukes the value cache.

Happy to provide a PR if this makes sense.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions