Skip to main content

WORK_LIMIT

Constant WORK_LIMIT 

Source
pub const WORK_LIMIT: u64 = _ /* 134_217_728u64 */;
Expand description

How much work one run may do before it gives up: nodes looked at on axes and by lang(), predicate tests, and nodes and every 16 bytes of text read for string-values. Some queries are quadratic on any engine (//p[following::p]), and a hostile page can make them run for hours. A unit takes one to twenty-odd nanoseconds, so this is a few seconds at most: still over ten times what the slowest query of the benchmark pages needs.