dynamicweb / DynamicWeb

Make feature requests for Dynamicweb in Issues section of this repository
https://doc.dynamicweb.dev/documentation/fundamentals/support/feature-requests.html
GNU General Public License v3.0
1 stars 0 forks source link

Debounce on Cart Save #175

Open nunoaguiar opened 1 month ago

nunoaguiar commented 1 month ago

Is your feature request related to a problem? Please describe. The Cart object currently triggers a lot of update queries to the database sometimes for a single user interaction (cart update). Looking simply at database transactions it's inefficient and an overhead.

Describe the solution you'd like Using Javascript Debounce as inspiration, apply it to the Cart Save method/event (which is called in a number of places), ensuring only 1 save "transaction" per "user interaction".

Describe alternatives you've considered We could not find any other way to workaround it.

Additional context This topic was discussed with Jeppe at the Summit