The grant management page (e.g. ¡/logged/grant-management/project/40) gets slower as there are more files attached in the deliverables. Even the "Finance" tab gets slower with more Deliverables attached.
By file attached can be any media (photos), invoices, scientific reports, financial reports.
The reason is that for each file Django is going to the object storage and gets the file size (and checks that the file exist). The flie size is displayed as information to the user.
I think that as it gets slow this should be replaced with something better like not displayed the file sizes, or storing (and using) them from the database so it would be fast again.
Another option would be to decouple the "Finance" and the "Deliverables" (using htmx?) loading the "Deliverables" only on clicking the tab. Or requesting the file sizes asynchronously from the browser.
The grant management page (e.g.
¡/logged/grant-management/project/40
) gets slower as there are more files attached in the deliverables. Even the "Finance" tab gets slower with more Deliverables attached.By file attached can be any media (photos), invoices, scientific reports, financial reports.
The reason is that for each file Django is going to the object storage and gets the file size (and checks that the file exist). The flie size is displayed as information to the user.
I think that as it gets slow this should be replaced with something better like not displayed the file sizes, or storing (and using) them from the database so it would be fast again. Another option would be to decouple the "Finance" and the "Deliverables" (using htmx?) loading the "Deliverables" only on clicking the tab. Or requesting the file sizes asynchronously from the browser.