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

Simplified MessageEncoder instantiation with default separators. #13679

Merged
merged 1 commit into from Nov 20, 2020

Conversation

apollo13
Copy link
Member

@apollo13 apollo13 commented Nov 13, 2020

This only saves a few bytes, but it does not hurt us so it is probably
worth it. Since decoding is unaffected by this there are no backwards
compat issues.

I am sure @carltongibson will approve every saved byte :D

@apollo13
Copy link
Member Author

On a related note: Does anyone know if we still support saving "non-json" messages? I feel like we could drop that __json_message stuff as well.

@felixxm felixxm changed the title Reduce byte overhead when storing messages in a cookie. Simplified MessageEncoder instantiation with default separators. Nov 20, 2020
@felixxm
Copy link
Member

felixxm commented Nov 20, 2020

@apollo13 MessageEncoder is already instantiated with separators in all cases 😉 so we will not reduce cookies' size, but it's nice simplification.

@apollo13
Copy link
Member Author

@apollo13 MessageEncoder is already instantiated with separators in all cases wink so we will not reduce cookies' size, but it's nice simplification.

Weird I could have sworn that I saw something different in the tests scratches head

@felixxm felixxm merged commit d10425f into django:master Nov 20, 2020
@apollo13 apollo13 deleted the minimal_storage branch May 8, 2022 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
3 participants