Skip redundant aset on out-of-band changes#556
Conversation
aset on out-of-band changes
|
Assuming that we want it in this repo then a pytest test would be helpful. |
Only call aset when the document content actually differs from the incoming model, avoiding unnecessary Y document mutations that can trigger duplicate cells during concurrent syncs. PY-1189 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Test that aset is skipped when document content matches the incoming model in both the _on_outofband_change and _maybe_save_document (OutOfBandChanges) code paths. PY-1189 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e49a199 to
eb83c39
Compare
|
done! |
davidbrochart
left a comment
There was a problem hiding this comment.
I'm wondering if we could use the file hash from the server?
|
correct me if wrong but the way i see it is the hash is only set once the document is saved so i think there is the potential for the ydoc to have unsaved edits which would make comparing the hashes not possible |
krassowski
left a comment
There was a problem hiding this comment.
I think this should not hurt beside some performance overhead from iterating the cell list as by default we would attempt to deudplicate)
I am ok with merging this if @davidbrochart gives thumbs up too.
|
I will start prep for release of 4.3.0 now, unless we want to wait for #558? |
|
#558 is far from being ready, so please go ahead. |
Summary
asetwhen the document content actually differs from the incoming modelTest plan
Related
#545
jupyter-server/jupyter_ydoc#376
jupyter-server/jupyter_ydoc#385