stenglein-lab / TreeTangler

MIT License
0 stars 0 forks source link

Performance record (slowest response) #16

Open meekrob opened 6 years ago

meekrob commented 6 years ago

http://localhost:8000/?left=trees/Orthobunyavirus_L&right=trees/Orthobunyavirus_M Over 10 seconds on a detangle!!

meekrob commented 6 years ago

The worst slow-down is coming from StringSimilarity findBestMatch, whereas array.indexOf is fine. The stringsimilarity method run by default (exact=false) in order to anticipate variations in how the user named nodes in the left and right trees. I'm thinking of invoking https://github.com/meekrob/cophy-treetools/blob/master/bin/test_leaf_lookups.js between trees, which currently shows how the substitution will proceed, e.g.:

Comparing Orthobunyavirus_L and Orthobunyavirus_M 14: Faceys_Paddock_refrence -1 NOT_FOUND 47 Faceys_Paddock_reference
19: Bunyamwera_refrence -1 NOT_FOUND 87 Bunyamwera_reference
48: Boraceia_batch3_sample -1 NOT_FOUND 56 Boracein_batch3_sample
50: Las_Maloyas_sample -1 NOT_FOUND 60 Lasaloyas_sample
54: Okola_sample -1 NOT_FOUND 67 Nola_sample 64: Itimirim_Kappa_sample -1 NOT_FOUND 13 Itimirim_sample 66: Acra_sample -1 NOT_FOUND 15 Acara_sample
73: Ananindeua_sample -1 NOT_FOUND 22 Ananindeua_sample_real
80: Gumboimbo_sample -1 NOT_FOUND 31 Gumbo_Limbo_sample
81: NEPV -1 NOT_FOUND 32 Nepuyo_sample
91: Patois_sample -1 NOT_FOUND 6 Patios_sample
95: Watermelon_silver_mottle_reference -1 NOT_FOUND 95 Watermelon_silverottle_reference

Prompting the user to select left-versus right (or replace both with write-in), will allow us to switch to exact=true.