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

Pickle/unpickle is slow #11

Closed
onyxfish opened this issue Oct 22, 2015 · 4 comments
Closed

Pickle/unpickle is slow #11

onyxfish opened this issue Oct 22, 2015 · 4 comments
Assignees

Comments

@onyxfish
Copy link
Collaborator

Can I switch to something like JSON and keep it generic? Is there a method I can implement on my agate objects to ensure they serialize correctly?

http://www.benfrederickson.com/dont-pickle-your-data/
https://kovshenin.com/2010/pickle-vs-json-which-is-faster/
http://matthewrocklin.com/blog/work/2015/03/16/Fast-Serialization/

@onyxfish onyxfish self-assigned this Oct 22, 2015
@onyxfish
Copy link
Collaborator Author

Should probably stay with pickle so things continue to work with other libraries, but may just be able to pickle less stuff from agate classes:

https://docs.python.org/3/library/pickle.html#pickling-class-instances

@onyxfish
Copy link
Collaborator Author

Should probably also be explicit about pickle protocols:

https://docs.python.org/3.5/library/pickle.html#data-stream-format

@onyxfish
Copy link
Collaborator Author

I don't see anything that can be avoided in the pickling. If it's going to be faster it's gonna have to be by finding a faster serializer.

@jpmckinney
Copy link
Member

Pickle is much faster in Python 3.8+.

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

No branches or pull requests

2 participants