abartov / bybeconv

Project Ben-Yehuda's content management system.
https://benyehuda.org/
Other
10 stars 5 forks source link

Welcome page loading uses a lot of CPU resources. #331

Closed damisul closed 2 months ago

damisul commented 2 months ago

On my machine loading of homepage takes several seconds, and it eats 100% of CPU during this time (and even cooler in my PC starts roaring during this).

I undestand that in production it is faster due to caching but anyway I believe we should consider optimising welcome page loading to make it faster/less CPU intensive. It should reduce load on server as well.

As far as I see from logs there is plenty of SQL requests done in loops on welcome page render. Perhaps we can optimize it with using eager loading, and similar stuff.

abartov commented 2 months ago

Yes, indeed, it's long-overdue optimization. Please do take some time to optimize it.