this pull request implements splitting of large fetches into multiple smaller fetches. this removes our dependency on the episphere firebrowse.js module.
the main addition of this pr is the groupBy parameter to fetchFromFireBrowse. the parameters are split by the keys specified in groupBy. here is an example:
given the following parameters and group-by variables
the parameters will be split into multiple objects
[{
bar: ["w", "x", "y"],
cat: "dog",
foo: ["a", "b"]
}, {
bar: ["z"],
cat: "dog",
foo: ["a", "b"]
}, {
bar: ["w", "x", "y"],
cat: "dog",
foo: ["c", "d"]
}, {
bar: ["z"],
cat: "dog",
foo: ["c", "d"]
}]
this array of parameters is the cartesian product of the N-length slices of each groupBy key, where N is the length of that key. fetches are run on each of these parameters concurrently using Promise.all. the results are coalesced into a single return object.
also can anyone try stressing these fetches, by selecting many genes and cancer types before pressing submit? does this pr seem faster than the current dev branch?
this pull request implements splitting of large fetches into multiple smaller fetches. this removes our dependency on the episphere firebrowse.js module.
the main addition of this pr is the
groupBy
parameter tofetchFromFireBrowse
. the parameters are split by the keys specified ingroupBy
. here is an example:given the following parameters and group-by variables
the parameters will be split into multiple objects
this array of parameters is the cartesian product of the N-length slices of each groupBy key, where N is the length of that key. fetches are run on each of these parameters concurrently using
Promise.all
. the results are coalesced into a single return object.i tested that these methods give identical outputs to their episphere counterparts (i.e., https://github.com/episphere/firebrowse/blob/a703c50643b3dd4b06777c3006f96b35ff245dc5/firebrowse.js#L67-L93) but i would appreciate it if people tested on their own.
also can anyone try stressing these fetches, by selecting many genes and cancer types before pressing submit? does this pr seem faster than the current dev branch?