summaryrefslogtreecommitdiff
path: root/issues/dataset_queried_twice.gmi
blob: 96d931baeb3527e1819bdabce5992d6a05b14030 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Dataset Queried Twice

## Tags

* assigned: alexm
* type: bug
* priority: medium
* keywords: performance enhancement, optimisation
* status: closed ,complete

## Description

In the function
=> https://github.com/genenetwork/genenetwork2/blob/6457f7e3516a04e238eeb061db358eea29cd2332/wqflask/base/trait.py#L21-L50 base.trait.create_trait
the dataset is queried twice:
* once in lines 30 to 33
* once in the call to GeneralTrait (line 42) - lines 67 to 74

Maybe, pass the dataset created in lines 30 to 33 to GeneralTrait to avoid re-querying the data.


## Note 26/10/22

Pr that fixes the issue:

=> https://github.com/genenetwork/genenetwork2/pull/740