Skip to content

imports/uploads slow due to reading files into memory due to schema validation and exif (for images) #167

Description

@djay

Currently the schema validation checks .data exists but not it's contents for INamedFile and INamedImage.
But since this is implemented as a property decorator this validation will load the whole file into memory. If this is a large file or you are doing a big import, this can slow down the process considerably as often the data is transferred using fs cp.

I have a PR that avoids this check. #166

This might also be able to be fixed in zope.schema itself - zopefoundation/zope.schema#127

In addition for images the file is being read for unnessarily for exif and content-type extraction. The attached PR also fixes this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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