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

[Bug] The final reports are slow to render #428

Open
1 task done
canle1404 opened this issue Jan 15, 2024 · 4 comments
Open
1 task done

[Bug] The final reports are slow to render #428

canle1404 opened this issue Jan 15, 2024 · 4 comments
Labels
state: triaged This issue has been triaged type: bug Something isn't working

Comments

@canle1404
Copy link

canle1404 commented Jan 15, 2024

Is There An Existing Issue

What Are You Seeing

image

I understand that the size of the HTML report file is larger when using 'newman-reporter-html'. In order to improve its load time, I push it to S3 with Cloudfront. While this method does make it faster, it takes a long time to render (I'm not exactly sure what the correct term is) which causes my browser to slow down for about 1-2 minutes.

Steps To Reproduce The Issue

Generate with the below script

Full Newman Command Or Node Script

newman run \
            postman_collection.json \
            --environment postman_environment.json \
            --reporters htmlextra \
            --reporter-htmlextra-export "$REPORT_FILE" \
            --reporter-htmlextra-noSyntaxHightlighting \
            --suppress-exit-code

HTMLEXTRA Version

1.23.0

Newman Version

6.1.0

Additional Context

No response

@canle1404 canle1404 added state: needs-triage This issue needs to be triaged type: bug Something isn't working labels Jan 15, 2024
Copy link

Hey @canle1404: 👋 - Thanks for helping to make the reporter better by raising this ticket. I will take a look as soon as I can and get back to you. Cheers, Danny.

@DannyDainton
Copy link
Owner

Hey, @canle1404,

Apologies for the tarde response here - It's been a busy time.

This is an ongoing issue , one that's been reported a few times. I haven't made any huge changes to speed this up. There are a number of flags that you can use to reduce the amount of information that's part of the final report.

Do you need all the information for every single request, who is the report for? Do they need to see everything?

There isn't really anything that i'm going to be doing here in the short term, you can leave this issue open for tracking purposes if you'd like to see any progress made in the future though.

@DannyDainton DannyDainton added state: triaged This issue has been triaged and removed state: needs-triage This issue needs to be triaged labels Feb 27, 2024
@DannyDainton DannyDainton changed the title Reports are slow to render [Bug] The final reports are slow to render Feb 27, 2024
@canle1404
Copy link
Author

Thank you @DannyDainton

@thetilliwilli
Copy link

sharing workarounds:

  1. first problem is syntax hightlighting
    1.1 solution: use noSyntaxHightlighting flag
  2. second problem is function formatXML and the RegEx parsing is to slow on big-lengthed rows
    image
    2.1 solution (aka hack) - rewriting final report before publishing to users:
    image
    2.2
const rewrittenContent = inFileContent.replace(
        `return xml.split('\\r\\n').map((node, index) => {`,
        `return xml.length > 10000 ? xml : xml.split('\\r\\n').map((node, index) => {`
      );
      fs.writeFileSync(outFilePath, rewrittenContent);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: triaged This issue has been triaged type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants