foodcoops / foodsoft

Web-based software to manage a non-profit food coop (product catalog, ordering, accounting, job scheduling).
https://foodcoops.net/
Other
318 stars 146 forks source link

migrate invoice attachments to active storage (slow performance financial links) #1037

Closed mjavurek closed 5 months ago

mjavurek commented 6 months ago

Our Foodsoft database contains a constantly rising number of invoices with attachments (PDF, JPEG). The following operations have become continuously slower and slower over the years and last now approx 2 to 3 minutes:

I remember @paroga mentioned that the source of the problem is that the invoice attachment files are stored in the database instead of as separate files which should be fixed in order to keep the Foodsoft performance also for increasing number of invoices with attachments.

yksflip commented 6 months ago

Thanks for raising this issue mjavurek! It sounds very likely to be the source of the problem. There was recently added support for filesystem storage. I think it should be possible to migrate the invoice attachments to active storage too. I'll put it on the roadmap.

yksflip commented 6 months ago

gave it a first tryout in: #1039