Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 1 | -1/+0 |
| | | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>` | ||||
* | Add type hints to expiring cache. (#9730) | Patrick Cloke | 2021-04-06 | 1 | -32/+51 |
| | |||||
* | Stop sub-classing object (#8249) | Patrick Cloke | 2020-09-04 | 1 | -2/+2 |
| | |||||
* | Replace iteritems/itervalues/iterkeys with native versions. (#7692) | Patrick Cloke | 2020-06-15 | 1 | -4/+2 |
| | |||||
* | Allow configuration of Synapse's cache without using synctl or environment ↵ | Amber Brown | 2020-05-11 | 1 | -4/+25 |
| | | | | variables (#6391) | ||||
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -5/+13 |
| | |||||
* | Correctly match 'dict.pop' api | Erik Johnston | 2018-10-01 | 1 | -3/+11 |
| | |||||
* | Don't update eviction metrics on explicit removal | Erik Johnston | 2018-10-01 | 1 | -5/+0 |
| | |||||
* | Fix ExpiringCache.__len__ to be accurate | Erik Johnston | 2018-09-21 | 1 | -12/+9 |
| | | | | | | It used to try and produce an estimate, which was sometimes negative. This caused metrics to be sad, so lets always just calculate it from scratch. | ||||
* | Add a five minute cache to get_destination_retry_timings | Erik Johnston | 2018-09-21 | 1 | -0/+13 |
| | | | | Hopefully helps with #3931 | ||||
* | Make ExpiringCache slightly more performant | Erik Johnston | 2018-09-21 | 1 | -1/+5 |
| | |||||
* | Fix some instances of ExpiringCache not expiring cache items | Erik Johnston | 2018-09-21 | 1 | -1/+0 |
| | | | | | | | | ExpiringCache required that `start()` be called before it would actually start expiring entries. A number of places didn't do that. This PR removes `start` from ExpiringCache, and automatically starts backround reaping process on creation instead. | ||||
* | Fix some looping_call calls which were broken in #3604 | Richard van der Hoff | 2018-07-26 | 1 | -1/+1 |
| | | | | | | | | | It turns out that looping_call does check the deferred returned by its callback, and (at least in the case of client_ips), we were relying on this, and I broke it in #3604. Update run_as_background_process to return the deferred, and make sure we return it to clock.looping_call. | ||||
* | Run things as background processes | Richard van der Hoff | 2018-07-18 | 1 | -1/+5 |
| | | | | | | | | This fixes #3518, and ensures that we get useful logs and metrics for lots of things that happen in the background. (There are certainly more things that happen in the background; these are just the common ones I've found running a single-process synapse locally). | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -3/+2 |
| | |||||
* | replacing portions | Amber Brown | 2018-05-21 | 1 | -2/+2 |
| | |||||
* | report metrics on number of cache evictions | Richard van der Hoff | 2018-02-05 | 1 | -1/+5 |
| | |||||
* | Use an ExpiringCache for storing registration sessions | Erik Johnston | 2017-06-29 | 1 | -0/+3 |
| | | | | | This is because pruning them was a significant performance drain on matrix.org | ||||
* | Add setdefault key to ExpiringCache | Erik Johnston | 2017-03-10 | 1 | -0/+7 |
| | |||||
* | Speed up cache size calculation | Erik Johnston | 2017-01-17 | 1 | -3/+12 |
| | | | | | | | | | | | Instead of calculating the size of the cache repeatedly, which can take a long time now that it can use a callback, instead cache the size and update that on insertion and deletion. This requires changing the cache descriptors to have two caches, one for pending deferreds and the other for the actual values. There's no reason to evict from the pending deferreds as they won't take up any more memory. | ||||
* | Use OrderedDict in ExpiringCache | Erik Johnston | 2017-01-16 | 1 | -10/+4 |
| | |||||
* | Add support for 'iterable' to ExpiringCache | Erik Johnston | 2017-01-16 | 1 | -9/+17 |
| | |||||
* | Change CacheMetrics to be quicker | Erik Johnston | 2016-06-03 | 1 | -4/+4 |
| | | | | | | 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. | ||||
* | Use syntax that works on both py2.7 and py3 | Mark Haines | 2016-03-07 | 1 | -1/+1 |
| | |||||
* | Reraise exception | Erik Johnston | 2016-03-01 | 1 | -0/+1 |
| | |||||
* | Correct cache miss detection | Erik Johnston | 2016-03-01 | 1 | -1/+1 |
| | |||||
* | Report size of ExpiringCache | Erik Johnston | 2016-02-23 | 1 | -2/+13 |
| | |||||
* | Fix flake8 warnings for new flake8 | Daniel Wagner-Hall | 2016-02-02 | 1 | -1/+1 |
| | |||||
* | copyrights | Matthew Hodgson | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Move all the caches into their own package, synapse.util.caches | Erik Johnston | 2015-08-11 | 1 | -0/+115 |