perf(editor): align benchmark with render skipping
This commit is contained in:
parent
be53eddfd2
commit
e4818c4cd7
1 changed files with 16 additions and 11 deletions
|
|
@ -437,7 +437,8 @@ public enum EditorBenchmarkProfiler {
|
|||
))
|
||||
|
||||
let clickRenderResult = measure {
|
||||
MarkdownTextStyler.apply(
|
||||
if dirtyClickPlan.requiresStyling {
|
||||
return MarkdownTextStyler.apply(
|
||||
to: textStorage,
|
||||
invalidationPlan: dirtyClickPlan,
|
||||
activeLineIndex: changedActiveLineIndex,
|
||||
|
|
@ -448,11 +449,15 @@ public enum EditorBenchmarkProfiler {
|
|||
accentColor: .controlAccentColor
|
||||
)
|
||||
}
|
||||
return MarkdownTextStylingResult.empty
|
||||
}
|
||||
measurements.append(EditorBenchmarkMeasurement(
|
||||
name: "render_update_click_dirty",
|
||||
category: .interaction,
|
||||
durationMilliseconds: clickRenderResult.durationMilliseconds,
|
||||
notes: "\(clickRenderResult.value.styledLineCount) styled lines"
|
||||
notes: dirtyClickPlan.requiresStyling
|
||||
? "\(clickRenderResult.value.styledLineCount) styled lines"
|
||||
: "skipped; dirty plan did not require styling"
|
||||
))
|
||||
|
||||
let typingStorageResult = measure {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue