Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change readonly instance props of DurableObjectState to lazy-writable.
This is really two changes: 1. Make these lazy properties. This is a strict win since the properties cannot change value during the lifetime of the object, so there's no reason to call into C++ on every access. This might even be a non-negligible performance gain for people who use `ctx.storage` a lot without memoizing it. 2. Make them writable. There's no real reason to prevent people from overwriting these if they really want to. Moreover, introducing `container` as a read-only property could arguably break someone who is, for whatever reason, monkey-patching this property in today.
- Loading branch information