Optimization - HTML Purifier
Description: Discusses possible methods of optimizing HTML Purifier.

# Optimization

Filed under Development
Return to the index.
HTML Purifier End-User Documentation

Here are some possible optimization techniques we can apply to code sections if they turn out to be slow. Be sure not to prematurely optimize: if you get that itch, put it here!

- Make Tokens Flyweights (may prove problematic, probably not worth it)
- Rewrite regexps into PHP code
- Batch regexp validation (do as many per function call as possible)
- Parallelize strategies