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

Add ObserveHasAnyDatoms #111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add ObserveHasAnyDatoms #111

wants to merge 1 commit into from

Conversation

erri120
Copy link
Member

@erri120 erri120 commented Nov 6, 2024

Resolves #91

@erri120 erri120 requested a review from halgari November 6, 2024 11:43
@erri120 erri120 self-assigned this Nov 6, 2024
@halgari
Copy link
Contributor

halgari commented Nov 13, 2024

I have a few problems with this PR:

  1. it performs a new query on every database update, so if the datom selection is large it will need to read in a ton of datoms every time
  2. it's a count on an IndexSegment. So we're reading in the entire segment just to check the size, then terminating with "if the size > 0". So we either should create a iterator and terminate after the first found entry or do something else

We should either use a iterator and terminate early or run this against the AddedDatoms property

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review
Development

Successfully merging this pull request may close these issues.

Fast path to observe if there are any datoms
2 participants