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

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

Closed
adrianiftode opened this Issue Mar 2, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@adrianiftode

adrianiftode commented Mar 2, 2017

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.

@Taritsyn

This comment has been minimized.

Owner

Taritsyn commented Mar 3, 2017

Hello, Adrian!

Thanks for information! I will look for the cause of this error.

Taritsyn added a commit that referenced this issue Mar 4, 2017

Taritsyn added a commit that referenced this issue Mar 4, 2017

@adrianiftode

This comment has been minimized.

adrianiftode commented Mar 4, 2017

Great catch, Andrey! I also learned something really useful about Regexes.

Btw, I think the .build folder should be added to the .gitignore.

I saw you used the statistics info in your tests. Is there anything else to do besides writing an ILogger implementation to log the statistics? Are these statistics enabled by default?

Thanks!

@Taritsyn

This comment has been minimized.

Owner

Taritsyn commented 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.

@Taritsyn

This comment has been minimized.

Owner

Taritsyn commented Mar 8, 2017

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. In markup minification managers and options was added a new property - GenerateStatistics (default false).

@adrianiftode

This comment has been minimized.

adrianiftode commented Mar 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment