Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI become slow and unresponsive when you have more than 100 rowsCount #25

Open
ArslanAsghar123 opened this issue Dec 6, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@ArslanAsghar123
Copy link

ArslanAsghar123 commented Dec 6, 2023

Screen.Recording.2023-12-06.at.3.33.16.PM.mov

i set the data as follow
static const int columnsCount = 29;
static const int subColumnsCount = 2;
static const int rowsCount = 100;
static const int subRowsCount = 10;
static const int totalColumns = columnsCount + subColumnsCount;

PTN: i used the same code in example

@rickypid rickypid added the bug Something isn't working label Jan 8, 2024
@rickypid rickypid self-assigned this Jan 8, 2024
@coderof19clc7
Copy link

Is this solved? Currently I'm getting very laggy UI with the data
static const int columnsCount = 6;
static const int subColumnsCount = 0;
static const int rowsCount = 100;
static const int subRowsCount = 100;
static const int totalColumns = columnsCount + subColumnsCount;

@coderof19clc7
Copy link

Hi @rickypid , after exploring the code of the package, I think the problem may come from the SingleChildScrollView and ListView as they will surely always render everything in the list all the time. So can you try to use ListView.builder or CustomScrollView instead and test with the large amount of item? Thanks

@rickypid
Copy link
Owner

Hi @coderof19clc7,

unfortunately I am in a very busy work period, it may be that the problem is related to SingleChildScrollView/ListView, I would have to do some tests to understand the impact of this change, I hope in the next few weeks to have a chance to look into the problem. Sorry

@ArslanAsghar123
Copy link
Author

@coderof19clc7 I resolved this issue by creating a custom table, and you're right — the ListView was causing the problem. However, you can also achieve the desired result using a ListView.builder with each row as a child. Additionally, I added an API call for expanded rows, which provides a faster UI experience by loading data for a row only when it's developed. The drawback of ListView.builder is its default behaviour of collapsing expanded rows when the view scrolls off-screen, as it optimizes performance by recycling views.

@rickypid
Copy link
Owner

Hi @ArslanAsghar123,

Could you create a PR with the changes to solve this issue?

Thank you!!!

@ArslanAsghar123
Copy link
Author

@rickypid I'll handle it as soon as possible, although I'm currently managing a busy schedule. (Note: I built a custom table with a mapper to manage row and column data, and I will transfer its logic to your repository)

@rickypid
Copy link
Owner

@ArslanAsghar123 As soon as you have time, I would like to solve this performance problem and if you have a suggestion, it is welcome!!!! 🚀

@rickypid
Copy link
Owner

Hi @ArslanAsghar123 and sorry for the reminder, have you had a chance to prepare a PR draft to propose your changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants