polkascan / explorer

Polkascan Substrate Explorer
GNU General Public License v3.0
42 stars 44 forks source link

Query performance improvements #5

Closed wouterter closed 1 year ago

wouterter commented 1 year ago

Performance improvements in Polkascan search queries. Currently all queries search the entire set of records to match specific criteria. Waiting time can be dramatically reduced by searching in subsequent sets of a fixed amount of blocks. Requests in the front-end will be turned into limited range requests, that can deliver results in fragments. The front-end will be responsible for searching continuously until the paginated result set is fulfilled. The query batches will be processed sequentially. The search results will show a button to search in the next set of blocks, until genesis is reached. Pagination on the back-end will no longer use counts on the database. Consequently, we won't know if there's a next page or not.