html_generator

Module performance

Source
Expand description

Performance optimization functionality for HTML processing.

This module provides optimized utilities for HTML minification and generation, with both synchronous and asynchronous interfaces. The module focuses on:

  • Efficient HTML minification with configurable options
  • Non-blocking asynchronous HTML generation
  • Memory-efficient string handling
  • Thread-safe operations

§Performance Characteristics

  • Minification: O(n) time complexity, ~1.5x peak memory usage
  • HTML Generation: O(n) time complexity, proportional memory usage
  • All operations are thread-safe and support concurrent access

§Examples

Basic HTML minification:

let path = Path::new("index.html");
let minified = minify_html(path)?;
println!("Minified size: {} bytes", minified.len());

Constants§

Functions§