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

Bug: querying for row word data twice now #43

Open
willeppy opened this issue Feb 9, 2024 · 0 comments
Open

Bug: querying for row word data twice now #43

willeppy opened this issue Feb 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@willeppy
Copy link
Member

willeppy commented Feb 9, 2024

Issue

In RowView, the getWordSpans function is called twice on updates

  1. First when selection map updates
  2. Then again when data updates (the textData prop)

This means double the queries are getting executed.

Hard to fix this in the row itself because needs both these dependencies

Possible fixes

I think to fix will need to get all the word data at once rather than from each row on render. To do this can either

  1. Subscribe to the $data store in DataDisplay.svelte and when it updates, check if I need to fetch new word data and get it for all the rows at once (then filter down to pass as prop to each row)
  2. Is probably best to do this in the TableClient when new data is fetched, but not totally sure how to do this
  3. Probably will also want to execute as arrow since returned table will be kind big
@willeppy willeppy added the bug Something isn't working label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant