blob: ab1ccd505e8e53477a35ebce5aff46348d87ed63 (
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
27
28
29
30
31
32
33
34
35
36
37
38
|
# Decouple Tasks in Correlations Results Display
## Tags
* type: bug
* priority: medium
* assigned: alexm
* keywords: correlations
* status: ongoing
## Description
=> https://github.com/genenetwork/genenetwork2/blob/f03127d751cd629596c2595d700fbb044725e01c/wqflask/wqflask/correlation/show_corr_results.py#L112 The loop processing the results
is doing way too much.
We need to slowly decouple the different tasks into separate functions that can be called successively on each individual trait to build up the results, with something like the `map` function, or list comprehensions.
=> https://github.com/genenetwork/genenetwork2/blob/f03127d751cd629596c2595d700fbb044725e01c/wqflask/wqflask/correlation/show_corr_results.py#L116-L122 The conditional fetching of traits data
should probably be done before we enter the looping part of the results processing to make the logic easier and decouple the fetching from the results processing.
## Notes 9/11/22
pr to fix this issue
=> https://github.com/genenetwork/genenetwork2/pull/742
## 2022-11-25
### Bulk Querying
The code in the
=> https://github.com/genenetwork/genenetwork2/blob/d318b1d649a3ece1a5a6c24bcd3496e14dbc69cd/wqflask/wqflask/correlation/show_corr_results.py#L169-L179 `generate_table_metadata` function
is still fetching the data one trait at a time, which is a performance bottleneck.
This could be changed to operate
=> https://github.com/genenetwork/genenetwork3/blob/4a9fd93d01b6d4bd9d9880dbf2274b3c7f2de37b/gn3/db/partial_correlations.py#L751-L791 something like this
|