shanirub / ecommerce

An E-commerce System Inspired by the Super Mario Universe
MIT License
2 stars 0 forks source link

Handle performance issues #15

Open shanirub opened 4 months ago

shanirub commented 4 months ago

All CRUD operations should be benchmarked to detect performance issues.

Stuff to consider: (example)

Adding an item to an order involves two calls to db (as an atomic operation):

  1. updating the corresponding product's stock.
  2. creating a new order_item object.

Each call has its own validations and takes time. Maybe can be rewritten to include only one call?