-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
[Priority] HighUsed to indicate top priority items that need quick attentionUsed to indicate top priority items that need quick attention[Type] PerformanceRelated to performance effortsRelated to performance efforts
Milestone
Description
Describe the bug
This happens after the initial autosave, from then on every keystroke (or any attribute change) will trigger serialisation of the whole post content. I would expect (partial) serialisation of the content to only happen once the post has to be saved, ideally only for the parts that have changed.
The issue seems to happen where we try to determine whether the post is auto saveable?
gutenberg/packages/editor/src/store/selectors.js
Lines 390 to 406 in cc5bf5c
export function isEditedPostAutosaveable( state ) { | |
// A post must contain a title, an excerpt, or non-empty content to be valid for autosaving. | |
if ( ! isEditedPostSaveable( state ) ) { | |
return false; | |
} | |
// If we don't already have an autosave, the post is autosaveable. | |
if ( ! hasAutosave( state ) ) { | |
return true; | |
} | |
// If the title, excerpt or content has changed, the post is autosaveable. | |
const autosave = getAutosave( state ); | |
return [ 'title', 'excerpt', 'content' ].some( ( field ) => ( | |
autosave[ field ] !== getEditedPostAttribute( state, field ) | |
) ); | |
} |
Looking further into this, but reporting now because it seems high priority.
adamsilverstein and SchneiderSamSchneiderSam
Metadata
Metadata
Assignees
Labels
[Priority] HighUsed to indicate top priority items that need quick attentionUsed to indicate top priority items that need quick attention[Type] PerformanceRelated to performance effortsRelated to performance efforts