This caused a cpu and memory spike on the parsoid cluster.
Description
Details
| Subject | Author | Repo | Branch | Lines +/- | |
|---|---|---|---|---|---|
| Prevent Parsoid from getting constipated on large lists | Subramanya Sastry | mediawiki/services/parsoid | master | +2 -2 |
Related Objects
Event Timeline
The following output reveals that the problem is in the tokenizer that returns list-sized chunks onwards. So, for large lists, it causes severe constipation ... requires a tokenizer fix to return list-item size chunks.
echo "*a\n*b\n*c\n*d\n*e\n*f\n*g\n*h\n*i\n*j\n*k\n*l\n\nboo\n\n*x\n**y\n*z\n\naha" | node parse --fetchConfig false --trace peg,tsp,list,sanitizer,html``
@ssastry, doing so might cost some performance in the common case of short lists. Just a guess though, didn't measure.
Change 183158 had a related patch set uploaded (by Subramanya Sastry):
T85744: Prevent Parsoid from getting constipated on large lists
No change in parser test timings .. marginally (in the realm of noise) faster even. And that large page now renders in 72 secs on my laptop.
Change 183158 had a related patch set uploaded (by Krinkle):
Prevent Parsoid from getting constipated on large lists
Change 183158 merged by jenkins-bot:
Prevent Parsoid from getting constipated on large lists