Improve rendering performance and split drag behavior
- Added CSS content-visibility and contain-intrinsic-size to list row containers in resolver-main.css and resolver-shell.css for off-main-thread rendering optimization. - Deferred queue list panel split drag updates to requestAnimationFrame in web/resolver/actions/queue_methods.js, reducing redundant DOM writes and guarding against duplicate frames during split dragging. - Deferred missing browser split drag updates to requestAnimationFrame in web/resolver/views/missing_browser_methods.js with optional chaining on split start values, preventing layout thrashing while dragging.
This commit is contained in:
@@ -728,6 +728,8 @@
|
||||
}
|
||||
|
||||
#model-resolver-modal .mr-missing-list-row {
|
||||
content-visibility: auto;
|
||||
contain-intrinsic-size: auto 64px;
|
||||
width: 100%;
|
||||
min-height: 64px;
|
||||
padding: 9px 12px 9px 8px;
|
||||
|
||||
@@ -426,6 +426,8 @@
|
||||
}
|
||||
|
||||
.mr-queue-item {
|
||||
content-visibility: auto;
|
||||
contain-intrinsic-size: auto 54px;
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
padding: 10px 0;
|
||||
|
||||
@@ -1947,11 +1947,18 @@ export const queueMethods = {
|
||||
}
|
||||
}
|
||||
if (this._splitPreviewCollapsed) return;
|
||||
this.applyQueueSplitWidth(this._pendingSplitWidth, {
|
||||
bounds,
|
||||
containerWidth: this._splitStart.containerWidth,
|
||||
skipIfUnchanged: true
|
||||
});
|
||||
|
||||
if (!this._splitDragFrame) {
|
||||
this._splitDragFrame = requestAnimationFrame(() => {
|
||||
this._splitDragFrame = null;
|
||||
if (!this._splitDragging || this._splitPreviewCollapsed) return;
|
||||
this.applyQueueSplitWidth(this._pendingSplitWidth, {
|
||||
bounds: this._splitStart?.bounds || bounds,
|
||||
containerWidth: this._splitStart?.containerWidth,
|
||||
skipIfUnchanged: true
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
endSplitDrag(e = null) {
|
||||
|
||||
@@ -1023,13 +1023,20 @@ export const missingBrowserMethods = {
|
||||
if (this._pendingMissingBrowserSplitWidth === this._appliedMissingBrowserSplitWidth) return;
|
||||
if (!this._missingBrowserSplitDetailPane) return;
|
||||
this.activateMissingBrowserSplitUi();
|
||||
this.applyMissingBrowserDetailWidth(this._missingBrowserSplitDetailPane, this._pendingMissingBrowserSplitWidth, {
|
||||
browserWidth: this._missingBrowserSplitStart.browserWidth,
|
||||
availableWidth: this._missingBrowserSplitStart.availableWidth,
|
||||
splitBounds: this._missingBrowserSplitStart.bounds,
|
||||
skipIfUnchanged: true
|
||||
});
|
||||
this._appliedMissingBrowserSplitWidth = this._pendingMissingBrowserSplitWidth;
|
||||
|
||||
if (!this._missingBrowserSplitFrame) {
|
||||
this._missingBrowserSplitFrame = requestAnimationFrame(() => {
|
||||
this._missingBrowserSplitFrame = null;
|
||||
if (!this._missingBrowserSplitDragging || !this._missingBrowserSplitDetailPane) return;
|
||||
this.applyMissingBrowserDetailWidth(this._missingBrowserSplitDetailPane, this._pendingMissingBrowserSplitWidth, {
|
||||
browserWidth: this._missingBrowserSplitStart?.browserWidth,
|
||||
availableWidth: this._missingBrowserSplitStart?.availableWidth,
|
||||
splitBounds: this._missingBrowserSplitStart?.bounds,
|
||||
skipIfUnchanged: true
|
||||
});
|
||||
this._appliedMissingBrowserSplitWidth = this._pendingMissingBrowserSplitWidth;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
endMissingBrowserSplitDrag(event = null) {
|
||||
|
||||
Reference in New Issue
Block a user