WyriHaximus / HtmlCompress

MIT License
78 stars 17 forks source link

use "voku/html-min" also as dom parser #41

Closed voku closed 5 years ago

voku commented 5 years ago

... only a idea: instead of tokenizing + dom-parsing we can use the dom-parser also the the script and style tags?!


This change is Reviewable

WyriHaximus commented 5 years ago

This looks absolutely great. One question tho, is it faster?

voku commented 5 years ago

Sorry I did not run any performance tests, I only run the unit tests, but the html-file access is very slow and I don't think that we can compare the results. But I am sure that it's faster, if we use the Dom Parser for the html minificaton, anyway.

WyriHaximus commented 5 years ago

Just did some benchmarks and where the current code did the compression in 74 seconds this PR did it in 58 seconds. Could you rebase so I can merge this PR In?

WyriHaximus commented 5 years ago

Awesome, thank you 👍 !