diff options
author | Frederick Muriuki Muriithi | 2021-12-22 13:55:57 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2021-12-22 13:55:57 +0300 |
commit | edfe0eaf6997bc613b5d5b15a625ade7b747af88 (patch) | |
tree | d8bb312cec9429c2b9cbb6b818ce1aa06a565472 | |
parent | 2f56ee37183938270197d9bd968648e65584513c (diff) | |
download | gn-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.
-rw-r--r-- | topics/gn1-migration-to-gn2/partial-correlations.gmi | 13 |
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. |