mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-27 13:08:12 +08:00
Do not over-prune var data cache (#1198)
* Remove unused variables and imports
* Simplify conditional
* Fix typo
* Do not overprune var data cache
There is a bug in how the universe and world gene sets are constructed
and passed to `ControlsHelpers.pruneVarDataCache` that causes the var
data cache to be over-pruned. This commit fixes the issue.
Consider the following example from the node console:
```
❯ node
Welcome to Node.js v13.5.0.
Type ".help" for more information.
> new Set([1], [2], [3])
Set(1) { 1 }
```
What we really want is the set `Set(3) { 1, 2, 3 }`, which can be
constructed as:
```
> new Set([].concat([1], [2], [3]))
Set(3) { 1, 2, 3 }
```
This commit is contained in:
@@ -172,7 +172,7 @@ export function pruneVarDataCache(varData, needed) {
|
||||
*/
|
||||
|
||||
/*
|
||||
VarDataCacheLowWatermark - this cofig value sets the minimum cache size,
|
||||
VarDataCacheLowWatermark - this config value sets the minimum cache size,
|
||||
in columns, below which we don't throw away data.
|
||||
|
||||
The value should be high enough so we are caching the maximum which will
|
||||
|
||||
Reference in New Issue
Block a user