Reduce memory usage when not using flower
Author: bufkeCreated Oct 3, 2023Updated Oct 3, 2023
Labelsenhancement
Right now, flower uses a about 5-6mb of ram when starting celery processes that do not run flower. That's not a lot, but when 20 projects do this it adds up.
I'm willing to investigate more and submit a PR, if there is interest. I did a quick proof of concept moving around imports that removed a little bit without breaking flower.
Here's a memray screenshot of running celery beat loading things like tornado.
An alternative approach would be to fix this at the celery level. A workaround is to not install flower on services where it isn't needed, however that can be burdensome. Many projects would want to have just one source code version that does all things.
Source: mher/flower