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

Switch to pickle for discprov caching #934

Merged
merged 3 commits into from Oct 14, 2020
Merged

Switch to pickle for discprov caching #934

merged 3 commits into from Oct 14, 2020

Conversation

raymondjacobson
Copy link
Member

@raymondjacobson raymondjacobson commented Oct 14, 2020

Trello Card Link

https://trello.com/c/qsYe7BPE/1611-switch-to-pickle

Description

Switches various discprov caching opts to pickle.

To test this, I made each serialization op & deserialization op happen 10,000 times per request:

json
dumps 12.662461519241333
loads 5.929422855377197

pickle
dumps 2.408290386199951
loads 2.4702045917510986

Services

  • Discovery Provider

Does it touch a critical flow like Discovery indexing, Creator Node track upload, Creator Node gateway, or Creator Node file system?

Delete an option.

  • ✅ Nope

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.
Include log analysis if applicable.

  1. Manually ran discprov against prod data & issued queries against
  2. Updated unit test

discovery-provider/src/utils/redis_cache.py Outdated Show resolved Hide resolved
discovery-provider/src/utils/redis_cache.py Outdated Show resolved Hide resolved
@raymondjacobson raymondjacobson merged commit 63f70ec into master Oct 14, 2020
@raymondjacobson raymondjacobson deleted the rj-pickle branch October 14, 2020 19:31
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

Successfully merging this pull request may close these issues.

None yet

3 participants