I created Flutter app as using Supabase as Database.

But it consumed 24.24 GB in about 20 days, even Instagram consumes 1.76 GB.

Many users experienced that their phones becomes slower and my app is killed.

When I see my app’s data consumption, It takes high data from 2 points.

1)

My app fetches data from table diaries with range 5 and as user scrolls down, it fetches 5 items of diaries data more.

When I just scrolls about 3 times, it consumes 32 MB.

I think that It is common practice of normal apps.

32 MB is common data consumption for this action?

This fetching is done in initState() of screen, which means whenever user opens this screen, fetching is executed.

Should I convert this action to subscribe changes of data?

But I think most of this action is done as my process, not subscription of data.

2)

My app fetches all necessary columns from table users, diaries, comments, likes, and steps in certain period.

And as combining these data, I returns total points of all users.

This takes too much data for sure, about 40 MB.

These actions are too large, so I can’t show my codes here.

But Please give me some advice.

I think many apps also have this kind of complexed query and fetching.

How to reduce data consumption..?



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *