summaryrefslogtreecommitdiff
path: root/topics/gn1-migration-to-gn2/partial-correlations.gmi
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-12-22 13:55:57 +0300
committerFrederick Muriuki Muriithi2021-12-22 13:55:57 +0300
commitedfe0eaf6997bc613b5d5b15a625ade7b747af88 (patch)
treed8bb312cec9429c2b9cbb6b818ce1aa06a565472 /topics/gn1-migration-to-gn2/partial-correlations.gmi
parent2f56ee37183938270197d9bd968648e65584513c (diff)
downloadgn-gemtext-edfe0eaf6997bc613b5d5b15a625ade7b747af88.tar.gz
Update with results of profiling the code
* After profiling the code, we document our results and ideas on future changes that would assist in optimising the code.
Diffstat (limited to 'topics/gn1-migration-to-gn2/partial-correlations.gmi')
-rw-r--r--topics/gn1-migration-to-gn2/partial-correlations.gmi13
1 files changed, 13 insertions, 0 deletions
diff --git a/topics/gn1-migration-to-gn2/partial-correlations.gmi b/topics/gn1-migration-to-gn2/partial-correlations.gmi
index 47516ad..b79c996 100644
--- a/topics/gn1-migration-to-gn2/partial-correlations.gmi
+++ b/topics/gn1-migration-to-gn2/partial-correlations.gmi
@@ -96,3 +96,16 @@ Some extra notes on UI that were not noted down:
There's some UI setup code after selection of the traits to use for the partial correlation. The UI setup code will probably be migrated to GN2, leaving the heavy-lifting "Partial Correlations" code, that I assume exists, for migration to GN3.
For GN3, it seems like we can simply reuse some of the trait-retrieval code migrated over when working on the clustered heatmaps.
+
+
+### 2021-12-22: fredm: Analysis of profiling information
+
+The greatest amount of time is spent in the database accessing code. The two biggest culprits are:
+
+* ~gn3.db.traits.retrieve_trait_info~
+* ~gn3.db.datasets.retrieve_trait_dataset~
+
+Possible optimisation ideas are as follows:
+
+* Most traits share common datasets. For all traits sharing a common dataset, it does not make sense to fetch the dataset multiple times. Instead, we should be able to fetch it once and share among all the traits that are from that dataset.
+* We can also try fetching the traits in a single call, instead of looping through them, fetching one at a time.