amp-toolbox-php
amp-toolbox-php copied to clipboard
mb_detect_encoding is very slow
Profiling the current test suite showed that the use of mb_detect_encoding()
made up more than 40% of the execution time of the entire test suite.
We should:
- [ ] ensure we only use it if really necessary to decrease the amount of times it runs
- [x] document that it is slow and that documents should therefore use a proper charset meta tag to begin with
- [ ] make sure a charset is set in integration like the WP plugin to avoid its use altogether in those cases