Matthias Radestock
91fd411c37
Merge pull request #2952 from weaveworks/string-keyed-known-service-cache
...
optimisation: faster knownServiceCache
2017-11-26 15:11:51 +00:00
Matthias Radestock
be8801ab92
optimisation: faster knownServiceCache
...
We use an LRU cache implementation that is keyed on strings, which
avoids conversion to/from interface and the memory allocation that
entails.
2017-11-25 19:33:49 +00:00
Matthias Radestock
b10f7178ce
Merge pull request #2950 from weaveworks/memoise-fixpoint
...
optimisation: make Memoise(Memoise(...)) only memoise once
2017-11-24 17:35:28 +00:00
Matthias Radestock
5bdf46956d
optimisation: make Memoise(Memoise(...)) only memoise once
...
All outputs of Memoise() are fixpoints to the function, i.e. feeding
them as inputs to the function just returns them.
We don't hit this optimisation in current code but have had instances
in the past.
2017-11-23 17:03:33 +00:00
Matthias Radestock
cfac26757f
Merge pull request #2949 from weaveworks/reset-all-caches
...
make render.ResetCache() reset all caches
2017-11-22 23:32:39 +00:00
Simon
d9815beff0
Merge pull request #2948 from weaveworks/fixes-flux-image-status
...
Correctly show whether there are new images or not.
2017-11-22 16:44:54 +01:00
Matthias Radestock
1c39d14c74
make render.ResetCache() reset all caches
...
so that benchmarks yield more consistent results.
2017-11-22 13:00:39 +00:00
Bryan Boreham
3bc8f22c11
Merge pull request #2938 from weaveworks/more-renderers
...
Rewrite more Map-Reduces as Renderers to save garbage
2017-11-22 11:21:06 +00:00
Matthias Radestock
1c206fb1c9
cosmetic: bring comment up to date
2017-11-22 10:40:34 +00:00
Bryan Boreham
5697d53034
Rewrite MapX2Host as a RenderFunc using joinResults
...
It's more efficient as many input Nodes map onto a few hosts.
2017-11-22 10:39:37 +00:00
Bryan Boreham
3e62f7b754
Rewrite MapProcess2Name to process all nodes in one pass
...
This is more efficient as there are typically many fewer names than
processes.
2017-11-22 10:33:00 +00:00
Matthias Radestock
346a0360ef
Refactor: split addToResults into two functions
...
This is preparatory to future refactorings: all existing calls are to
Endpoints which have no children and where we don't want a Counter.
We make addChildAndChildren an obvious extension of addChild even
though it adds a dead code path (we never call addChildAndChildren
with an endpoint).
2017-11-22 10:30:18 +00:00
Matthias Radestock
f56a44e67d
cosmetic: move a function
2017-11-22 09:46:33 +00:00
Matthias Radestock
334dba20e7
cosmetic: move some functions
2017-11-22 09:19:10 +00:00
Matthias Radestock
b24334c246
fix small bug in Filtered calculation
...
Filtering nodes *adds* to the Filtered count.
2017-11-22 09:13:23 +00:00
Matthias Radestock
8c4ae0577d
Merge pull request #2947 from weaveworks/simplify-decoration
...
Decorators, begone!
2017-11-21 20:49:45 +00:00
Matthias Radestock
a12d707d9b
refactor: rename decorateWithStats to computeStats
...
to de-decorate
2017-11-21 20:17:00 +00:00
Matthias Radestock
0c43526465
refactor: use new FilterFunc.Apply
...
instead of constructing temporary Filter renderers.
This also makes clearer what is going on.
2017-11-21 20:16:59 +00:00
Matthias Radestock
e643ec56be
refactor: move filter logic to FilterFunc
...
so it becomes accessible w/o having to construct a Filter renderer.
2017-11-21 20:16:59 +00:00
Matthias Radestock
88e8b52d66
Decorators, begone!
...
Decorators were just a complicated way of constructing filters.
2017-11-21 20:16:30 +00:00
Matthias Radestock
093857f37f
refactor: extract a little test helper
2017-11-21 20:13:14 +00:00
Matthias Radestock
e93362e70a
Merge pull request #2946 from weaveworks/expand-k8s-namespace-calculation
...
Expand the app's k8s namespace calculation
2017-11-21 07:55:42 +00:00
Simon Howe
ef99e672c9
Correctly show whether there are new images or not.
...
find returns 'undefined' not 'null'!
2017-11-20 14:37:33 +01:00
Matthias Radestock
67950985ef
refactor: introduce IsConnected FilterFunc
...
and rename existing IsConnected const to IsConnectedMark
2017-11-20 09:28:56 +00:00
Matthias Radestock
ae153e57f5
refactor: remove Decorator from render.Renderer.Render() signature
2017-11-18 18:04:52 +00:00
Matthias Radestock
a82d245e93
simplify render decoration
...
Decoration is in fact quite a simple process that is applied on entry
to rendering: we take a base renderer, transform it with a decorator,
and then render a report with it. The new render.Decorate() function
does exactly that.
There is one exception. When rendering an individual node, e.g. for
showing its details panel in the UI, we must not lose the node during
decoration. That requires some special logic, which previously resided
in the PreciousNodeRenderer, and now lives in handleNode.
2017-11-18 18:04:52 +00:00
Matthias Radestock
830cfc964d
Merge pull request #2944 from weaveworks/fewer-ref
...
pass render filters and maps by value rather than reference
2017-11-18 17:55:34 +00:00
Matthias Radestock
4e4c3b25c4
Expand the app's k8s namespace calculation
...
to include recently added k8s types.
This is all rather inefficient. See #2945 .
2017-11-18 17:35:57 +00:00
Matthias Radestock
aaf4e54df2
pass render filters and maps by value rather than reference
...
They are small and don't carry mutable state, so there is no point
passing them by reference.
2017-11-18 12:10:00 +00:00
Bryan Boreham
a375891a4d
Merge pull request #2937 from weaveworks/parse-optimisations
...
Parsing optimisations
2017-11-16 18:22:20 +00:00
Bryan Boreham
b9890064c2
Copy net.ParseIP and modify to save memory allocations
...
Pass in a slice on the stack instead of allocating one on the heap:
reduces garbage, hence makes the program run faster
Also apply knowledge that critbitgo will do an append() with one extra
byte, so we do that allocation up-front too. This is innocuous should
we stop using critbitgo or should its internals change.
2017-11-15 23:15:55 +00:00
Bryan Boreham
e41332a775
In id-parsing functions, Split strings using Index to save allocations
...
These routines are called a lot, so this change reduces garbage collection
2017-11-15 23:15:10 +00:00
Aaron Kirkbride
2bda044eef
Merge pull request #2929 from weaveworks/react-16
...
Upgrade to React 16
2017-11-15 14:23:27 +00:00
Filip Barl
2df38731a6
Fix some warnings.
2017-11-14 17:26:57 +01:00
Jordan Pellizzari
f0888baf8a
Merge pull request #2934 from weaveworks/1449-image-details-undefined
...
Fix undefined image bug
2017-11-14 07:49:46 -08:00
Aaron Kirkbride
848c9bab3c
Upgrade to React 16
2017-11-14 13:22:00 +00:00
Filip Barl
bf78fc5ba4
Merge pull request #2919 from weaveworks/2823-include-timestamp-in-url
...
Use timestamp in URL
2017-11-14 14:16:41 +01:00
jpellizzari
723d47170e
Fix undefined image bug
2017-11-13 16:43:13 -08:00
Jordan Pellizzari
c5bdebdffe
Merge pull request #2935 from weaveworks/2697-image-up-to-date
...
Fix incorrect image status text bug
2017-11-13 16:13:19 -08:00
jpellizzari
85453901d8
Fix incorrect image status text bug
2017-11-13 15:34:43 -08:00
Jordan Pellizzari
b281f64ffc
Merge pull request #2930 from weaveworks/optional-deps
...
Remove optional dependencies
2017-11-13 09:09:21 -08:00
Matthias Radestock
7863c3efda
Merge pull request #2926 from weaveworks/render-with-stats
...
produce stats as part of rendering
2017-11-10 23:05:46 +00:00
jpellizzari
d684d0d2b0
Remove optional dependencies
2017-11-10 13:31:50 -08:00
Filip Barl
4bd7fc759a
Store the pausedAt state in the app URL.
2017-11-10 16:46:56 +01:00
Matthias Radestock
21a91fe9dd
remove HostRenderer memoisation
...
since it was only introduced to because producing stats would hit the
renderer twice, which is no longer the case.
2017-11-08 07:15:28 +00:00
Matthias Radestock
9bd8bd825b
remove now superfluous Renderer.Stats method
...
step 2 (and final step) in producing stats as part of Rendering
2017-11-08 07:15:28 +00:00
Matthias Radestock
8f7e00f46a
Stats are easily produced as part of Rendering
...
...so there is no need for a separate Stats method.
step 1: return stats from Render
2017-11-08 07:15:28 +00:00
Bryan Boreham
893537ca5c
Merge pull request #2920 from weaveworks/endpoints-renderers
...
Optimisation: replace three map-reduces with Renderers
2017-11-07 10:39:10 +00:00
Bryan Boreham
917ef980a4
Memoise HostRenderer
...
This shows a big improvement in BenchmarkTopologyList
2017-11-07 10:18:27 +00:00
Bryan Boreham
ec0689b5aa
Code review: improve consistency of naming and ordering
2017-11-06 22:12:13 +00:00