Skip to content

Performance Improvement #10

@GitHubBJW

Description

@GitHubBJW

Greetings,
In the ReportHTML.psm1, I noticed the code spent a long time on the line 227:
ForEach-Object{$ScriptHeaders += $_ + "rn" }
I could be misunderstanding why the carriage return and line feeds are being added. If those aren't necessary it is also not necessary to cycle through each line of those .js files. I modified the .psm1 file locally to the following:
$ScriptHeaders += Get-Content $ScriptFile -ReadCount 0
and performance was greatly improved. It didn't break the report I was generating, and I don't want to be presumptuous and assume that it won't break something else. Please consider this change if it works in the larger context of the code.
Thank you.
Brian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions