Photo uploader: reduce client memory usage #15

Merged
Roflin merged 1 commits from uploader-optimisation into master 2020-02-25 13:30:49 +01:00
Member

To create inline thumbnails locally, the previous version of the photo uploader used base64 representations of the local files to be uploaded. While this is effective, it is a little wasteful. When uploading several photos at once, this could even lead to the page becoming less responsive.

This PR changes the process such that the photos are actually resized on a canvas, only using the local original as a buffer. Hence, only the resized photo is retained in memory.

To create inline thumbnails locally, the previous version of the photo uploader used base64 representations of the local files to be uploaded. While this is effective, it is a little wasteful. When uploading several photos at once, this could even lead to the page becoming less responsive. This PR changes the process such that the photos are actually resized on a canvas, only using the local original as a buffer. Hence, only the resized photo is retained in memory.
Roflin approved these changes 2020-02-25 13:28:24 +01:00
Roflin closed this pull request 2020-02-25 13:30:49 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Public/pics#15
No description provided.