dreamcatcher-tech / dreamcatcher-stack

https://dreamcatcher.land
1 stars 0 forks source link

cache iporm class instantiations based on CID #151

Open inverted-capital opened 1 year ago

inverted-capital commented 1 year ago

Rather than constructing each one anew, we should reuse the object cache. This means that sometimes the crush can stop if we have the object, since it will come with all its children too.

Less ram, faster uncrush, strong structural sharing between pulses, skips assertion checks like signature verification.

This cache would only be in ram, and could be mapped against the block object, since this would be in ram too. A weakmap between the block object and the iporm object could be used, to allow garbage collection based on block cache ejection.