Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Store the default push actions in a more efficient manner #1923

Merged
merged 3 commits into from
Feb 16, 2017

Conversation

erikjohnston
Copy link
Member

No description provided.



def _serialize_action(actions, is_highlight):
"""Custom serializer for actions. This allows us to "compress" common actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe explain what the compression scheme is?

@erikjohnston erikjohnston force-pushed the erikj/push_action_compress branch from e17f031 to 0b8e0dd Compare February 16, 2017 14:39
@erikjohnston erikjohnston force-pushed the erikj/push_action_compress branch from 0b8e0dd to 9501033 Compare February 16, 2017 14:40
@erikjohnston erikjohnston force-pushed the erikj/push_action_compress branch from 9501033 to 502ae6c Compare February 16, 2017 14:47
"""Custom serializer for actions. This allows us to "compress" common actions.

We use the fact that most users have the same actions for notifs (and for
highlights). We replaces these default actions with the emtpy string.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"replaces", "emtpy"

Maybe something more along the lines of "We store these default actions as the empty string rather than the full JSON. Since the empty string isn't valid JSON there is no risk of this clashing with any real JSON actions."

Copy link
Contributor

@NegativeMjark NegativeMjark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@erikjohnston erikjohnston merged commit b6557f2 into develop Feb 16, 2017
erikjohnston added a commit that referenced this pull request Mar 13, 2017
Changes in synapse v0.19.3-rc1 (2017-03-08)
===========================================

Features:

* Add some administration functionalities. Thanks to morteza-araby! (PR #1784)

Changes:

* Reduce database table sizes (PR #1873, #1916, #1923, #1963)
* Update contrib/ to not use syutil. Thanks to andrewshadura! (PR #1907)
* Don't fetch current state when sending an event in common case (PR #1955)

Bug fixes:

* Fix synapse_port_db failure. Thanks to Pneumaticat! (PR #1904)
* Fix caching to not cache error responses (PR #1913)
* Fix APIs to make kick & ban reasons work (PR #1917)
* Fix bugs in the /keys/changes api (PR #1921)
* Fix bug where users couldn't forget rooms they were banned from (PR #1922)
* Fix issue with long language values in pushers API (PR #1925)
* Fix a race in transaction queue (PR #1930)
* Fix dynamic thumbnailing to preserve aspect ratio. Thanks to jkolo! (PR
  #1945)
* Fix device list update to not constantly resync (PR #1964)
* Fix potential for huge memory usage when getting device that have
  changed (PR #1969)
@erikjohnston erikjohnston deleted the erikj/push_action_compress branch March 29, 2017 10:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants