cloudflare / cloudflare/lol-html

[Feature Request] Allow memory introspection of HtmlRewriter

Open
#61 0 comments 1 reaction 0 assignees View on GitHub
AREA: production code enhancement
Dominant language
Rust
Stars
2.1k
Forks
111
PR merge metrics
No merged PRs in 30d

Description

Allowing users to see the memory that `HtmlRewriter` used in the last rewrite cycle (`.end()` to `.end()`, basically) would be fantastic for applications who want to know more about their resource usage

I got the idea for this from [docs.rs/#930 (comment)](https://github.com/rust-lang/docs.rs/pull/930#issuecomment-668707731), having this monitoring would allow us to adjust our memory cap to whatever's realistic since we have vastly varying file sizes

Contributor guide

Open the contributing guide

Research direction

Start by locating the HtmlRewriter API and its .end() implementation; the issue names no files or tests. Done means exposing memory used between one .end() call and the next so applications can inspect usage and adjust their memory cap.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.