Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve speed for laying out features for embedded/mainthreadrpc scenarios #2097

Merged
merged 7 commits into from
Jul 2, 2021

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Jul 1, 2021

Changes the rectangles data structure for granularrectlayout back to a normal map instead of an observable map. The layout is queried directly for nodes at a given position, and precompute layout uses rbush to do this (previously precompute layout didn't have any function to do this)

Fixes #2038

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Jul 1, 2021
@cmdcolin cmdcolin marked this pull request as draft July 1, 2021 14:28
@cmdcolin cmdcolin force-pushed the revert_to_regular_map_layout branch from 8702e56 to a20deba Compare July 1, 2021 14:57
@cmdcolin cmdcolin requested a review from garrettjstevens July 1, 2021 14:59
@codecov
Copy link

codecov bot commented Jul 1, 2021

Codecov Report

Merging #2097 (99e1e19) into main (002bacb) will increase coverage by 0.47%.
The diff coverage is 77.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2097      +/-   ##
==========================================
+ Coverage   61.45%   61.93%   +0.47%     
==========================================
  Files         480      476       -4     
  Lines       22981    22783     -198     
  Branches     5391     5345      -46     
==========================================
- Hits        14124    14111      -13     
+ Misses       8574     8390     -184     
+ Partials      283      282       -1     
Impacted Files Coverage Δ
plugins/linear-comparative-view/src/util.ts 1.92% <ø> (ø)
...gFeatureRenderer/components/SvgFeatureRendering.js 56.00% <0.00%> (+1.31%) ⬆️
packages/core/util/layouts/PrecomputedLayout.ts 25.80% <25.00%> (-0.29%) ⬇️
packages/core/util/layouts/GranularRectLayout.ts 87.01% <100.00%> (+2.23%) ⬆️
...ments/src/LinearAlignmentsDisplay/models/model.tsx 71.26% <100.00%> (ø)
.../src/PileupRenderer/components/PileupRendering.tsx 78.21% <100.00%> (-0.22%) ⬇️
plugins/breakpoint-split-view/src/model.ts 65.44% <100.00%> (ø)
...aseLinearDisplay/models/BaseLinearDisplayModel.tsx 77.72% <100.00%> (-1.81%) ⬇️
...nts/src/SNPCoverageRenderer/SNPCoverageRenderer.ts 80.24% <0.00%> (-7.41%) ⬇️
packages/core/util/index.ts 78.30% <0.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 002bacb...99e1e19. Read the comment docs.

Copy link
Collaborator

@garrettjstevens garrettjstevens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, and I don't see the bug we were seeing before where mouseover didn't work sometimes.

@cmdcolin cmdcolin marked this pull request as ready for review July 2, 2021 15:11
@cmdcolin cmdcolin merged commit 1a4c043 into main Jul 2, 2021
@cmdcolin cmdcolin deleted the revert_to_regular_map_layout branch July 2, 2021 15:39
cmdcolin added a commit that referenced this pull request Jul 5, 2021
* Drive mouseovers using layout data structure

* Intermediate

* Fixup breakpoint split view

* Fix unit tests

* Fix up some lint and tsc

* Standardize getById to return recttuple for both layouts

* Remove unused breakpoint split viewer from linear-comparative-view
@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Jul 6, 2021
@cmdcolin cmdcolin changed the title Revert to regular map layout Improve speed for laying out features for embedded/mainthreadrpc scenarios Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alignments layout code slow under MainThreadRpcDriver
2 participants