Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mimetype is super slow for big binary filenodes #37

Open
lukaszb opened this issue Jan 23, 2011 · 0 comments
Open

mimetype is super slow for big binary filenodes #37

lukaszb opened this issue Jan 23, 2011 · 0 comments

Comments

@lukaszb
Copy link
Member

lukaszb commented Jan 23, 2011

Ok like in the title, i found that the node.is_binary function really messes things up.

{{{

!python

@LazyProperty
def is_binary(self):
    """
    Returns True if file has binary content.
    """          
    return bool(self.content and '\0' in self.content)

}}}

It looks like this is a CPU killer, for content files with let's say 70MB binary file.

I think it's need to be rewrite the to a lazy read in chunk generator for the content. That should speed up things a lot.


Reference: https://bitbucket.org/marcinkuzminski/vcs/issues/37/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant