We currently don't seem to have code in PHP that checks whether the PNG file already exists and was generated with the correct data, so we have no principled way of skipping the regeneration of the PNG file each time.
Fix this by adding a check similar to that used for the yearly graphs.
After I implemented https://github.com/vipulnaik/donations/commit/f4bf27adb5bfdb05fa16d6f3a8a8a18aa3eb16d4 + https://github.com/vipulnaik/donations/commit/1dc9cb4834fa509827b2e9711cedb87f0974d1c3 I noticed that the CPU load was still nontrivial, and that Python calls were being made despite this. It looks like the remaining Python calls are being made for timeframe plots.
We currently don't seem to have code in PHP that checks whether the PNG file already exists and was generated with the correct data, so we have no principled way of skipping the regeneration of the PNG file each time.
Fix this by adding a check similar to that used for the yearly graphs.