kadena-io / block-explorer

https://explorer.chainweb.com
8 stars 7 forks source link

Bounded scan aware search results #56

Closed emmanueldenloye closed 1 year ago

enobayram commented 1 year ago

I've just run this branch and made a code search for "abc12", which I carefully chose as a search string that would yield results over a large number of retries:

bs-aware-code-search.webm

Here are the requests made over the course of this recording:

image

So, over these 30 requests, chainweb-data must have scanned through 1.5M transactions to find these ones.

enobayram commented 1 year ago

Here's the same exercise repeated for the event search:

bs-aware-event-search.webm

And the requests made:

image

enobayram commented 1 year ago

@emmanueldenloye and I have just realized that we need to work around the empty-string-by-default behavior of response headers here, similar to the dumpEmpty from the account-search PR.