Skip to content

Commit 482d566

Browse files
jyn514Joshua Nelson
authored and
Joshua Nelson
committed
Only allot 5 MB for LOL parser
1 parent 195b424 commit 482d566

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/config.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ impl Config {
5858

5959
max_file_size: env("DOCSRS_MAX_FILE_SIZE", 50 * 1024 * 1024)?,
6060
max_file_size_html: env("DOCSRS_MAX_FILE_SIZE_HTML", 50 * 1024 * 1024)?,
61-
max_parse_memory: env("DOCSRS_MAX_PARSE_MEMORY", 350 * 1024 * 1024)?,
61+
// LOL HTML only uses as much memory as the size of the start tag!
62+
// https://github.com/rust-lang/docs.rs/pull/930#issuecomment-667729380
63+
max_parse_memory: env("DOCSRS_MAX_PARSE_MEMORY", 5 * 1024 * 1024)?,
6264
})
6365
}
6466

0 commit comments

Comments
 (0)