Page MenuHomePhabricator

Excessive cpu/load parsing ur.wikipedia.org/wiki/نام_مقامات_اے
Closed, ResolvedPublic

Description

This caused a cpu and memory spike on the parsoid cluster.

Event Timeline

ssastry raised the priority of this task from to High.
ssastry updated the task description. (Show Details)
ssastry added a project: Parsoid.
ssastry subscribed.
ssastry set Security to None.

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

https://gerrit.wikimedia.org/r/183158

Patch-For-Review

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

https://gerrit.wikimedia.org/r/183158

Patch-For-Review

Change 183158 merged by jenkins-bot:
Prevent Parsoid from getting constipated on large lists

https://gerrit.wikimedia.org/r/183158

Arlolra subscribed.