Skip to content

save_file should store the file etag hash so that it doesn't need to be calculated on each read #181

Closed
@ShaneHarvey

Description

@ShaneHarvey

In #170 we remove md5 hashing and updated send_file to dynamically calculate the sha1 hash on each call. This is expensive because it requires reading the full GridFS file and hashing the contents to set the etag, then we read the file in full again to send the file itself.

It would be better for save_file to add the etag hash to the GridFS file metadata so that it doesn't need to be recalculated on each send_file call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions