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

Optimise memory allocations in HtmlRenderer. #695

Merged
merged 2 commits into from
Sep 28, 2024

Commits on Sep 14, 2024

  1. Optimise memory allocations in HtmlRender.

    This is mainly done by avoiding creating additional `StringBuilder`s and writing direct to the `TextWriter` where possible.
    Where `StringBuilder`s are still needed, they're pooled and reused
    
    Saves on the amount of allocated memory and time paused for GC.
    
    ## Before
    
    > - CommandLine: "s:\ReportGenerator\src\Playground\bin\Debug\net8.0\Playground.exe"
    > - Runtime Version: V 8.0.824.36612
    > - CLR Startup Flags: 8388611
    > - Total CPU Time: 38,443 msec
    > - Total GC CPU Time: 1,666 msec
    > - Total Allocs : 8,378.712 MB
    > - Number of Heaps: 1
    > - GC CPU MSec/MB Alloc : 0.199 MSec/MB
    > - Total GC Pause: 2,567.9 msec
    > - % Time paused for Garbage Collection: 8.1%
    > - % CPU Time spent Garbage Collecting: 4.3%
    > - Max GC Heap Size: 335.820 MB
    > - Peak Process Working Set: 395.698 MB
    > - Peak Virtual Memory Usage: 2,480,960.369 MB
    
    ## After
    
    > - CommandLine: "s:\ReportGenerator\src\Playground\bin\Debug\net8.0\Playground.exe"
    > - Runtime Version: V 8.0.824.36612
    > - CLR Startup Flags: 8388611
    > - Total CPU Time: 28,247 msec
    > - Total GC CPU Time: 1,183 msec
    > - Total Allocs : 2,938.748 MB
    > - Number of Heaps: 1
    > - GC CPU MSec/MB Alloc : 0.403 MSec/MB
    > - Total GC Pause: 1,348.8 msec
    > - % Time paused for Garbage Collection: 6.2%
    > - % CPU Time spent Garbage Collecting: 4.2%
    > - Max GC Heap Size: 352.258 MB
    > - Peak Process Working Set: 417.976 MB
    > - Peak Virtual Memory Usage: 2,480,959.902 MB
    afscrome committed Sep 14, 2024
    Configuration menu
    Copy the full SHA
    b0fa437 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Fix bugs

    afscrome committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    3959774 View commit details
    Browse the repository at this point in the history