Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add timing code to Tasks code block rendering code #2740

Merged
merged 11 commits into from
Mar 27, 2024

Conversation

claremacrae
Copy link
Collaborator

@claremacrae claremacrae commented Mar 27, 2024

Description

  • Add new user debug setting recordTimings, which optionally enables new console output from new class PerformanceTracker.
  • Look at the diffs in this PR to see:
    • the docs of PerformanceTracker
    • and the new Console timing facilities in Tasks.md
  • Tasks-Demo vault:
    • Add range of query files (limit 1.md .... limit 5000.md) to the 'Stress Test' folder, to quickly get search and rendering timings
  • Contributing vault:
    • Add new page to Contributing docs: 'Console timing facilities in Tasks'

Motivation and Context

  • To make it easier to get elapsed times for critical sections of code
  • To make it easier to interpret performance flame charts.

How has this been tested?

  • Using it to time the rendering of search results
  • Viewing flame charts

Screenshots (if appropriate)

To create these outputs, the setting debugSettings > recordTimings was set to true.

Example console output:

Search: 4tNIzakiWp - Stress Test/limit 1.md: 131.60000002384186 milliseconds
Render: 4tNIzakiWp - Stress Test/limit 1.md: 26.900000035762787 milliseconds
Search: 63ata8hRM1 - Stress Test/limit 25.md: 89.20000004768372 milliseconds
Render: 63ata8hRM1 - Stress Test/limit 25.md: 32.30000001192093 milliseconds
Search: XxLS3Z3SHT - Stress Test/limit 50.md: 101.10000002384186 milliseconds
Render: XxLS3Z3SHT - Stress Test/limit 50.md: 62.80000001192093 milliseconds
Search: 7T4xmf87Ky - Stress Test/limit 100.md: 108.5 milliseconds
Render: 7T4xmf87Ky - Stress Test/limit 100.md: 165.79999995231628 milliseconds
Search: XngShdTbz3 - Stress Test/limit 150.md: 91.40000003576279 milliseconds
Render: XngShdTbz3 - Stress Test/limit 150.md: 164 milliseconds
Search: aCvrb1aufJ - Stress Test/limit 200.md: 91.10000002384186 milliseconds
Render: aCvrb1aufJ - Stress Test/limit 200.md: 209.89999997615814 milliseconds

Example screenshot of labels in profiling timings

Sample flame chart with Timing labels

Types of changes

Changes visible to users:

  • New feature (prefix: feat - non-breaking change which adds functionality)
  • Sample vault (prefix: vault - improvements to the Tasks-Demo sample vault)
  • Contributing Guidelines (prefix: contrib - any improvements to documentation content for contributors - see Contributing to Tasks)

Checklist

Terms

@claremacrae claremacrae added scope: performance issues Issues with speed or responsiveness scope: rendering of tasks How the plugin displays tasks (except CSS issues) labels Mar 27, 2024
@claremacrae claremacrae merged commit 20aa859 into main Mar 27, 2024
2 checks passed
@claremacrae claremacrae deleted the performance-measurements branch March 27, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: performance issues Issues with speed or responsiveness scope: rendering of tasks How the plugin displays tasks (except CSS issues)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant