woocommerce / woocommerce-ios

WooCommerce iOS app
https://www.woocommerce.com/mobile
GNU General Public License v2.0
322 stars 113 forks source link

Optimize storage usage in remaining stores #14122

Open itsmeichigo opened 1 month ago

itsmeichigo commented 1 month ago

Since we marked writerDerivedStorage and saveIfNeeded as deprecated in StorageManagerType, we should remove references to these in the stores and use the new performAndSave method instead. The new method ensures that all write operations are handled in a single operation queue (first come first serve).

Extra: Look out for fetch requests made in for loops and optimize those by fetching a list of items or getting items from the relationships with the already fetched object.

dangermattic commented 1 month ago

🚫 Please add a type label (e.g. type: enhancement) and a feature label (e.g. feature: stats) to this issue.