Reshav-Paul / grodudes_app

A grocery app made with flutter and wordpress/woocommerce backend
MIT License
13 stars 6 forks source link

Fetching product data is slow #3

Closed axhx closed 3 years ago

axhx commented 3 years ago
  1. While opening the application sometimes the application shows all the products and sometimes it gets loads for more times.

  2. While selecting some category(example:fruits) it keeps on loading and loading and doesn't display the items. when we close and restart the application it shows products properly.

How to resolve this issue and please guide and help me to resolve this issue.

Reshav-Paul commented 3 years ago

Have you modified the code to fetch all products under a category using the hack I shared?

If yes, then it will be slow depending on how much data you are fetching i.e. the number of items in that category. The solution is to implement a dynamic loading list as is implemented in Orders.dart.

If you have not made any modifications to the code, the server itself might be slow.

Have you implemented the looping solution I shared? How many products are you fetching?

axhx commented 3 years ago

What is that hack and where should i place it? Please help me to overcome this

Reshav-Paul commented 3 years ago

Check issue #1 but it's best not to implement hacky solution. Build a dynamic loading list. Or the server itself is responding slow possibly due to cold starts. I will be closing this issue since it is related to issue #1.