refactor: switch extension message format from pickle to json #1240
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been pushing underlying PRs and commits to enable this change recently: #1221, #1230, 6706467, ee73262 #1237 d8f65e2 a23ff49
It's working well for me, although pickle is apparently more compact, so the result is the messages are actually much longer now (sometimes more than twice as big).
I tested with ulauncher-clipboard and sending 200 items (not that my window is big enough to render them all). The result size is 54196 bytes instead of 22773 before this PR.
But that still wasn't noticably slow. JSON is much faster to serialize and parse (more than 10x) and it is generally better and a step towards supporting extensions in other languages #283
I'm not sure how much the PickleFramer class (now renamed) still makes sense though. It looks to me like it's more about the socket communication and switching from pickle to json doesn't really change anything there?