LocusZoom becomes very slow when loading dense regions (with a lot of variants). Some users would like to increase max_region_size and/or render modern datasets that may be imputed to better panels.
This ticket contains some initial low-hanging performance improvements:
Use fewer system resources/ listeners/ function calls to render each scatter plot point (cache computed values, event bubbling, etc)
Provide an option to coalesce adjacent points in the scatter plot. This can save reduce the number of points to render by 40-50% for a narrow region or noisy plot, and >90% for a GWAS with a few strong hits in a wide viewing region.
Summary of changes
The new scatter plot directives coalesce._ control whether to group together nearby points, and if so, what parameters to use. By default it groups together adjacent points within ~1 circle-diameter distance of each other in x and y.
Coalescing is turned on by default for association plots (only). You may wish to adjust this behavior and options if you use a different y-axis range for your plots (eg, user-selectable "toggle y-axis display" behaviors)
Remove shift-click "multiselect" from plots: few people seem to use this feature
Bugfixes:
Correctly remove old scatter plot labels on toggle/re-render
Fix double-escaping issue with label display values
TODO
[x] Cache the most frequently re-computed values
[x] Explore refactoring event listeners to use bubbling- do we really need 1000 events for 1000 scatter plot points?
Purpose
LocusZoom becomes very slow when loading dense regions (with a lot of variants). Some users would like to increase
max_region_size
and/or render modern datasets that may be imputed to better panels.This ticket contains some initial low-hanging performance improvements:
Summary of changes
coalesce._
control whether to group together nearby points, and if so, what parameters to use. By default it groups together adjacent points within ~1 circle-diameter distance of each other in x and y.Bugfixes:
TODO