The app becomes sluggish when opening large models (like 4UG0). Some observations:
Hovered residue search algorithm spends a lot of time looking for the hovered residue.
mc.get_ligand_svg is called several thousand times.
mc.get_bond_mesh_instanced gets called multiple times on molecule load (regardless of molecule size).
Fixes:
Improve hovered residue search algorithm.
Only call mc.get_ligand_svg on demand (i.e. opening the "Ligands" dropdown).
Fix issue where mc.get_bond_mesh_instanced gets called multiple times when loading a molecule.
Give users the ability to turn off hovered atom.
When a molecule is larger than certain threshold, default representation should be ribbons (or maybe spheres?) and hovered atom should be turned off. Show toast to inform user of this.
The app becomes sluggish when opening large models (like 4UG0). Some observations:
mc.get_ligand_svg
is called several thousand times.mc.get_bond_mesh_instanced
gets called multiple times on molecule load (regardless of molecule size).Fixes:
mc.get_ligand_svg
on demand (i.e. opening the "Ligands" dropdown).mc.get_bond_mesh_instanced
gets called multiple times when loading a molecule.