printfuck / xExtension-Readable

A FreshRSS extension to fetch article content with Readability or Mercury
GNU Affero General Public License v3.0
42 stars 8 forks source link

CPU time and RAM usage when idling #4

Closed helmut72 closed 2 weeks ago

helmut72 commented 1 year ago

Thanks, have tried it and works.

But it looks like it doesn't really idle compared to other running containers. Also RAM usage is a bit high in idle state:

Bildschirm­foto 2022-12-18 um 16 27 02
printfuck commented 1 year ago

Hi there,

Mem usage looks reasonably considering, that it's running a full blown browser engine. But you might be able to restict that via docker parameters: https://docs.docker.com/compose/compose-file/compose-file-v2/#cpu-and-other-resources

The cpu usage seems to be inevitable, when using the phpdockio's container and readability. I checked inside the container and the nodejs process's seem to be constantly polling

readability

Based on this you could go on and build the container yourself - running it with only on process (which would suffice, based on how the extension and freshrss are updating feeds). But for entirely eliminating the issue, you'd probably look a bit into how readability works. (I don't have the time for that and I'm also not maintaining phpdockerio's docker image)

helmut72 commented 1 year ago

Ok, thanks. I understand. I thought this Docker image is also from you. Why don't you just use this library, but a whole webservice? https://github.com/fivefilters/readability.php

printfuck commented 1 year ago

That's a good idea.

I might add it as another option since it seems to be modified by fivefilters.

But I also am thankful for PRs, because I can barely find the time for the project.