physio-praxis / myPhysio

Physio Praxis
https://physio-praxis.vercel.app
1 stars 0 forks source link

Research and Implement search aggregation for large number of components. #34

Open Mahmoud-zino opened 6 months ago

Mahmoud-zino commented 6 months ago

Search aggrigation should be applied to the customer view search.

Mahmoud-zino commented 3 months ago

After some research this is what I have found:

  1. We should use svelte Svelte custom store to handle reactivity, since it is very optimized for this kind of functionalities.
  2. Make sure when displaying a filtered list in the dom to use svelte's each with a key defined so svelte can optimize tracking changes. ex:
    {#each items as item (item.id)}
  3. use Lunr.js to handle the searching/filtering as it is lightweight, easy to use and have minimum impact on performance.
  4. Implement Debouncing to prevent too many filter operations while the user is still writing in the search box.