yaqwsx / jlcparts

Better parametric search for components available for JLC PCB assembly
https://yaqwsx.github.io/jlcparts/
MIT License
572 stars 52 forks source link

Cancel ongoing query when the query is changed #11

Closed yaqwsx closed 3 years ago

yaqwsx commented 4 years ago

Currently, all the issued queries have to finish. If the user makes adjustments every 1.5 seconds, multiple queries are issued (and the result of the old ones is discarded). This could lead to laggy UI.

It would be nice to be able to cancel the previous queries. This is the guide provided by Dexie.js author: https://stackoverflow.com/questions/64114482/aborting-dexie-js-query

yaqwsx commented 3 years ago

This was tackled in fb60c24 - however, it is not part of the implementation as canceling queries seems to make no difference. On the other hand, filtering by chunks makes.