Readability question

There appears to be a length restriction in plugins/af_readability/init.php of 500k:

198 if ($tmp && mb_strlen($tmp) < 1024 * 500) {

Is this an arbitrary limit? Feeds that used to work with readability stopped one day and I finally tracked down why/where it was failing. I increased it to 1024 * 5000 and the feeds worked again. Is this dangerous?

there was a case where readability misbehaved because of an incredibly huge document and a VDS got suspended (!) by the hosting provider because of unusual activity. thus, i’ve added some safeguards.

e: i wouldn’t remove the limit entirely because article link can lead to a linux ISO or something huge like that, but it could be made configurable, i.e. as a global .env tweakable.

But at this point hasn’t the content already been retrieved from the site? If you can put a cap on the retrieval I see the benefit, but it looks to me like we’re throwing away perfectly good html.

I’m happy to learn otherwise.

By the way, I only use the plugin for individual articles, not entire feeds.

readability eats resources while it does its thing, it can cause OOMs etc

also there are provisions in place to cap the size of downloaded files, at least when using curl