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

django-picklefield slow compared to a naive solution using jsonpickle #12

Closed
araichev opened this issue Feb 5, 2014 · 3 comments
Closed

Comments

@araichev
Copy link

araichev commented Feb 5, 2014

Hi, i use django-picklefield in a project of mine and noticed that it's quite slow compared to pickling an object using jsonpickle (https://github.com/jsonpickle/jsonpickle), storing the result in a TextField, and unpickling the TextField back into a Python object. Do you know what's up with that?

I don't have any benchmarks to show for at present, but i'll make some when i get a chance. Thought i'd raise the issue now, though.

@charettes
Copy link
Collaborator

Benchmark would be greatly appreciated since we use the C bindings when available while from I could see jsonpickle is entirely written in Python.

Did you try using the protocol kwarg of PickledObjectField to use the latest version?

@Koed00
Copy link

Koed00 commented Sep 3, 2015

It also helps to set the protocol to highest. It's not the most compatible mode, but the fastest

PickledObjectField(null=True, protocol=-1)

@charettes
Copy link
Collaborator

Closing due to the lack of benchmarks.

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

3 participants