archethic-node icon indicating copy to clipboard operation
archethic-node copied to clipboard

Smart Contracts: Workers should not keep the parsed contracts in memory

Open bchamagne opened this issue 1 year ago • 0 comments

Is your feature request related to a problem?

There's no point for the workers to keep the contracts in memory. It stays in memory for a long time which is a waste of memory. And, on release upgrade, we need to kill the workers because the contracts are already parsed and the interpreter might have changed.

Describe the solution you'd like

Worker should parse the contract to prepare the schedulers but the parsed contract should not be kept. On trigger, we can parse it again.

Additional context

Maybe the argument about memory is not really valid due to the way process' heap is working?

Epic

No response

bchamagne avatar Sep 01 '23 09:09 bchamagne