Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Run Black. (#5482) | Amber Brown | 2019-06-20 | 1 | -6/+7 |
| | |||||
* | Make scripts/ and scripts-dev/ pass pyflakes (and the rest of the codebase ↵ | Amber Brown | 2018-10-20 | 1 | -1/+3 |
| | | | | on py3) (#4068) | ||||
* | Use efficient .intersection | Erik Johnston | 2018-07-17 | 1 | -4/+1 |
| | |||||
* | Fix perf regression in PR #3530 | Erik Johnston | 2018-07-17 | 1 | -1/+6 |
| | | | | | | | | The get_entities_changed function was changed to return all changed entities since the given stream position, rather than only those changed from a given list of entities. This resulted in the function incorrectly returning large numbers of entities that, for example, caused large increases in database usage. | ||||
* | Don't return unknown entities in get_entities_changed | Erik Johnston | 2018-07-13 | 1 | -8/+1 |
| | | | | | | | | The stream cache keeps track of all entities that have changed since a particular stream position, so get_entities_changed does not need to return unknown entites when given a larger stream position. This makes it consistent with the behaviour of has_entity_changed. | ||||
* | Reduce set building in get_entities_changed | Richard van der Hoff | 2018-07-12 | 1 | -8/+12 |
| | | | | | | | | | | | This line shows up as about 5% of cpu time on a synchrotron: not_known_entities = set(entities) - set(self._entity_to_key) Presumably the problem here is that _entity_to_key can be largeish, and building a set for its keys every time this function is called is slow. Here we rewrite the logic to avoid building so many sets. | ||||
* | run isort | Amber Brown | 2018-07-09 | 1 | -3/+2 |
| | |||||
* | Revert "Revert "Try to not use as much CPU in the StreamChangeCache"" (#3454) | Amber Brown | 2018-06-28 | 1 | -2/+4 |
| | |||||
* | Revert "Try to not use as much CPU in the StreamChangeCache" | Matthew Hodgson | 2018-06-26 | 1 | -4/+2 |
| | |||||
* | fixes | Amber Brown | 2018-06-26 | 1 | -2/+2 |
| | |||||
* | fixes | Amber Brown | 2018-06-26 | 1 | -2/+2 |
| | |||||
* | try and make loading items from the cache faster | Amber Brown | 2018-06-26 | 1 | -2/+4 |
| | |||||
* | Port to sortedcontainers (with tests!) (#3332) | Amber Brown | 2018-06-06 | 1 | -26/+31 |
| | |||||
* | replacing portions | Amber Brown | 2018-05-21 | 1 | -1/+1 |
| | |||||
* | Revert "Use sortedcontainers instead of blist" | Richard van der Hoff | 2018-04-13 | 1 | -2/+2 |
| | | | | | | | | | | | This reverts commit 9fbe70a7dc3afabfdac176ba1f4be32dd44602aa. It turns out that sortedcontainers.SortedDict is not an exact match for blist.sorteddict; in particular, `popitem()` removes things from the opposite end of the dict. This is trivial to fix, but I want to add some unit tests, and potentially some more thought about it, before we do so. | ||||
* | Use sortedcontainers instead of blist | Vincent Breitmoser | 2018-04-10 | 1 | -2/+2 |
| | | | | | | | | This commit drop-in replaces blist with SortedContainers. They are written in pure python so work with pypy, but perform as good as native implementations, at least in a couple benchmarks: http://www.grantjenks.com/docs/sortedcontainers/performance.html | ||||
* | Define CACHE_SIZE_FACTOR once | Erik Johnston | 2017-07-04 | 1 | -5/+1 |
| | |||||
* | Rewrite conditional | Erik Johnston | 2017-06-09 | 1 | -1/+1 |
| | |||||
* | Fix has_any_entity_changed | Erik Johnston | 2017-06-09 | 1 | -4/+4 |
| | | | | | | | | Occaisonally has_any_entity_changed would throw the error: "Set changed size during iteration" when taking the max of the `sorteddict`. While its uncertain how that happens, its quite inefficient to iterate over the entire dict anyway so we change to using the more traditional `bisect_*` functions. | ||||
* | Add stream change cache | Erik Johnston | 2017-05-31 | 1 | -0/+15 |
| | |||||
* | Fix assertion to stop transaction queue getting wedged | Richard van der Hoff | 2017-03-15 | 1 | -1/+1 |
| | | | | | | | | ... and update some docstrings to correctly reflect the types being used. get_new_device_msgs_for_remote can return a long under some circumstances, which was being stored in last_device_list_stream_id_by_dest, and was then upsetting things on the next loop. | ||||
* | Change get_pos_of_last_change to return upper bound | Erik Johnston | 2016-09-15 | 1 | -3/+4 |
| | |||||
* | Use stream_change cache to make get_forward_extremeties_for_room cache more ↵ | Erik Johnston | 2016-09-15 | 1 | -0/+5 |
| | | | | effective | ||||
* | Change CacheMetrics to be quicker | Erik Johnston | 2016-06-03 | 1 | -8/+8 |
| | | | | | | 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. | ||||
* | Return list, not generator. | Erik Johnston | 2016-03-14 | 1 | -3/+1 |
| | |||||
* | Limit stream change cache size too | Erik Johnston | 2016-03-01 | 1 | -1/+5 |
| | |||||
* | Change the way we figure out presence updates for small deltas | Erik Johnston | 2016-02-23 | 1 | -0/+16 |
| | |||||
* | If stream pos is greater then earliest known key and entity hasn't changed, ↵ | Erik Johnston | 2016-01-29 | 1 | -8/+3 |
| | | | | then entity hasn't changed | ||||
* | Prefill stream change caches | Erik Johnston | 2016-01-29 | 1 | -1/+4 |
| | |||||
* | If the same as the earliest key, assume nothing has changed. | Erik Johnston | 2016-01-28 | 1 | -0/+5 |
| | |||||
* | Correctly update _entity_to_key | Erik Johnston | 2016-01-28 | 1 | -4/+5 |
| | |||||
* | Fix inequalities | Erik Johnston | 2016-01-28 | 1 | -2/+2 |
| | |||||
* | Include cache hits with has_entity_changed | Erik Johnston | 2016-01-28 | 1 | -0/+4 |
| | |||||
* | Change name and doc has_entity_changed | Erik Johnston | 2016-01-28 | 1 | -1/+3 |
| | |||||
* | Cache tags and account data | Erik Johnston | 2016-01-28 | 1 | -0/+95 |