If I want to minify an HTML page from PHP, will I be gaining or losing more?
More clearly: I want to keep formatting and practice for when editing the page, preserving the edentation. But I also worry about loading the page, since in development it is becoming heavier than I would like, so one solution is to minify and save some KBs by removing everything that is unnecessary for the user to download the page. Similarly with CSS and JS.
But since I wanted to do this with PHP (generate an output removing the garbage), I wanted to know if I would lose more time processing the page than if it had not minified and downloaded.
I understand that this depends on several factors, but I would like to consider large volumes of information (about 2MB not minified and 1.2MB minified), which is almost 60% difference in size. What are the factors that would allow page processing to slow down?
Are there any other options to make the page light?