Commit Graph

67 Commits (f0ca08828082eb1f0a5214b14099034ca53ecbab)

Author SHA1 Message Date
Erik Johnston 955f34d23e Change get_pos_of_last_change to return upper bound 2016-09-15 15:12:07 +01:00
Erik Johnston cb3edec6af Use stream_change cache to make get_forward_extremeties_for_room cache more effective 2016-09-15 14:28:13 +01:00
Erik Johnston 45fd2c8942 Ensure invalidation list does not grow unboundedly 2016-08-19 16:09:16 +01:00
Erik Johnston c0d7d9d642 Rename to on_invalidate 2016-08-19 15:13:58 +01:00
Erik Johnston dc76a3e909 Make cache_context an explicit option 2016-08-19 15:02:38 +01:00
Erik Johnston ba214a5e32 Remove lru option 2016-08-19 14:17:11 +01:00
Erik Johnston 4161ff2fc4 Add concept of cache contexts 2016-08-19 14:17:07 +01:00
Erik Johnston 248e6770ca Cache federation state responses 2016-07-21 10:30:12 +01:00
Erik Johnston 3b096c5f5c Merge branch 'erikj/cache_perf' of github.com:matrix-org/synapse into develop 2016-06-03 12:00:33 +01:00
Erik Johnston 58a224a651 Pull out update_results_dict 2016-06-03 11:47:07 +01:00
Erik Johnston 73c7112433 Change CacheMetrics to be quicker
We change it so that each cache has an individual CacheMetric, instead
of having one global CacheMetric. This means that when a cache tries to
increment a counter it does not need to go through so many indirections.
2016-06-03 11:26:52 +01:00
Erik Johnston e043ede4a2 Small optimisation to CacheListDescriptor 2016-06-03 11:19:22 +01:00
Erik Johnston 597013caa5 Make cachedList go a bit faster 2016-06-03 11:13:29 +01:00
Erik Johnston af03ecf352 Deduplicate joins 2016-04-07 14:19:02 +01:00
Mark Haines 87f2dec8d4 Make the cache objects be per instance rather than being global 2016-04-06 13:08:05 +01:00
Mark Haines 77cba688ed Fix typo 2016-03-24 18:02:37 +00:00
Mark Haines 191c7bef6b Deduplicate identical /sync requests 2016-03-24 17:47:31 +00:00
Erik Johnston 8122ad7bab Simplify intern_dict 2016-03-23 16:41:54 +00:00
Erik Johnston acdfef7b14 Intern all the things 2016-03-23 16:25:54 +00:00
Erik Johnston 75daede92f String intern 2016-03-23 14:53:53 +00:00
Erik Johnston c4a8cbd15a Make LruCache use a dedicated _Node class 2016-03-22 16:06:21 +00:00
Erik Johnston a547e2df85 Return list, not generator. 2016-03-14 15:30:19 +00:00
Mark Haines 239badea9b Use syntax that works on both py2.7 and py3 2016-03-07 20:13:10 +00:00
Erik Johnston 374f9b2f07 Limit stream change cache size too 2016-03-01 13:30:15 +00:00
Erik Johnston ce2cdced61 Move cache size fiddling to descriptors only. Fix tests 2016-03-01 13:21:46 +00:00
Erik Johnston 910fc0f28f Add enviroment variable SYNAPSE_CACHE_FACTOR, default it to 0.1 2016-03-01 12:56:39 +00:00
Erik Johnston 72165e5b77 Reraise exception 2016-03-01 11:00:10 +00:00
Erik Johnston ff2d7551c7 Correct cache miss detection 2016-03-01 10:59:17 +00:00
Erik Johnston 278d6c0527 Report size of ExpiringCache 2016-02-23 16:46:21 +00:00
Erik Johnston c77dae7a1a Change the way we figure out presence updates for small deltas 2016-02-23 14:54:40 +00:00
Erik Johnston 2c1fbea531 Fix up logcontexts 2016-02-08 14:26:45 +00:00
Daniel Wagner-Hall d83d004ccd Fix flake8 warnings for new flake8 2016-02-02 17:18:50 +00:00
Erik Johnston e70165039c If stream pos is greater then earliest known key and entity hasn't changed, then entity hasn't changed 2016-01-29 16:41:32 +00:00
Erik Johnston 18579534ea Prefill stream change caches 2016-01-29 14:37:59 +00:00
Erik Johnston b18114e19e Merge pull request #536 from matrix-org/erikj/sync
Make /sync "better".
2016-01-29 13:04:51 +00:00
Erik Johnston fb7299800f Directly set self.value 2016-01-29 11:29:14 +00:00
Erik Johnston c046630c33 Remove spurious self.size 2016-01-29 11:17:54 +00:00
Erik Johnston a30364c1f9 Correctly bookkeep the size of TreeCache 2016-01-29 10:44:46 +00:00
Erik Johnston 766526e114 Make TreeCache keep track of its own size. 2016-01-29 10:11:21 +00:00
Erik Johnston 50e18938a9 Reset size on clear 2016-01-29 10:00:45 +00:00
Erik Johnston 3f5dd18bd4 If the same as the earliest key, assume nothing has changed. 2016-01-28 18:11:41 +00:00
Erik Johnston 40431251cb Correctly update _entity_to_key 2016-01-28 18:05:43 +00:00
Erik Johnston 82cf3a8043 Fix inequalities 2016-01-28 17:44:04 +00:00
Erik Johnston 0663c5bd52 Include cache hits with has_entity_changed 2016-01-28 17:27:28 +00:00
Erik Johnston 45cf827c8f Change name and doc has_entity_changed 2016-01-28 16:39:18 +00:00
Erik Johnston 00cb3eb24b Cache tags and account data 2016-01-28 16:37:41 +00:00
Erik Johnston c23a8c7833 Ensure keys to RoomStreamChangeCache are ints 2016-01-28 15:55:26 +00:00
Erik Johnston e1941442d4 Invalidate caches properly. Remove unused arg 2016-01-28 15:02:41 +00:00
Erik Johnston b97f6626b6 Add cache to room stream 2016-01-27 17:33:26 +00:00
David Baker 7cd418d38e Don't add the member functiopn if we're not using treecache 2016-01-22 13:40:37 +00:00