question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Perfomance is very slow when a HTML comment is inside a JavaScript block

See original GitHub issue

I’ve mistakenly placed a HTML comment inside a JavaScript block that caused the time to load a page to increase from 200-300 ms to 6-7 seconds. Besides this, that block contained a quiet large JSON array, but removing that comment did the perf fix.

Obviously the comment shouldn’t have been there, but I still think it is an issue if this causes such a drop in the load time.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Taritsyncommented, Mar 5, 2017

Are these statistics enabled by default?

By default, generation of statistics is disabled, because it slightly reduces performance.

Is there anything else to do besides writing an ILogger implementation to log the statistics?

Unfortunately, now in ASP.NET extensions is missing the ability to enable generation of statistics (logger always gets its equal to null), but in next release I will add this feature.

0reactions
adrianiftodecommented, Mar 8, 2017

Many thanks!

2017-03-08 18:05 GMT+02:00 Andrey Taritsyn notifications@github.com:

Hello, Adrian!

Unfortunately, now in ASP.NET extensions is missing the ability to enable generation of statistics (logger always gets its equal to null), but in next release I will add this feature.

I have added this feature in version 2.3.0 https://github.com/Taritsyn/WebMarkupMin/releases/tag/v2.3.0. In markup minification managers and options was added a new property - GenerateStatistics (default false).

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Taritsyn/WebMarkupMin/issues/31#issuecomment-285083630, or mute the thread https://github.com/notifications/unsubscribe-auth/ANHaa-Us152EkduQtVRu89r_Sws5GEmAks5rjtHVgaJpZM4MRkYS .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Do spaces/comments slow Javascript down?
Whitespaces and comments increase the size of the JavaScript file, which slows down the actual downloading of the file from the server - ......
Read more >
Do HTML Comments Affect Performance? - Maker's Aid
Leaving comments in your website's HTML markup slows loading because web browsers have more code to parse. This results in slower selection of ......
Read more >
Do HTML Comments Affect Performance - CONQUER CODING
HTML comments are perfectly acceptable to use in almost all circumstances. On the other hand, too much of something can have unintended and...
Read more >
Import JavaScript Into HTML: This Mistake Slows Down ...
The import of external JavaScript files slows down the loading of your website because they interrupt the parsing process in the browser. The ......
Read more >
Blogger Comment JavaScript Causing Slow Page Loading ...
I am writing to bring attention to an issue I am facing with the Blogger Comment JavaScript code. I have noticed that the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found