xihaian251 commented on PR #931:
URL: https://github.com/apache/burr/pull/931#issuecomment-6553637045

   One lifecycle detail on the proposed resume-seeded memo
   I checked the resume path at the current PR head (`06d02aec`). There is a 
lifecycle mismatch in the proposed memo semantics — not a defect in the current 
branch, since `SerializationContext` is stateless today.
   `_serialization_context_factory()` creates a new `SerializationContext` each 
time it is called. During a resumed build, it is called once around 
`_load_from_sync_persister()` / `_load_from_async_persister()`, and again in 
`Application.__init__()` when the hook context is installed.
   If the deserializer seeds `serialization_context.memo` during load, it seeds 
the first instance; the Application's hook context then uses a second, empty 
instance.
   I reproduced this with a prototype that adds only `memo` to 
`SerializationContext`: the resumed build creates two contexts with memo sizes 
`[1, 0]`, and the first persist still performs `exists` + `digest`.
   When the same context instance is shared between load-time deserialization 
and the Application's hook context, the memo remains seeded and the first 
persist for the unchanged artifact performs no store I/O.
   Could we create one context per built Application and pass that same 
instance to both the initializer-load context manager and the Application's 
hook context?
   It should remain isolated per Application, rather than global or shared 
across separately built apps.
   This looks like a small builder-level plumbing change now, and it is 
necessary for the resume-seeding behavior described in §1a/§1b to work as 
intended.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to