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

[TC-1104] Tableview improvements #2515

Closed
wants to merge 1 commit into from

Conversation

farfromrefug
Copy link
Contributor

The first thing and most important thing in that branch is an optimisation of scrolling on android. the getView() method is called many times on the same row, and every-time the setRowData was called (which is really heavy).
So i changed it to only call setRowData when the data actually changed.

I also added "reuse" and "rowappear" events in the tableview. This allows huge improvements in tableview loading and scrolling. For exemple if you download async images, you can start the download only when the row appears and stop it on reuse. Also you can "create" the row content only on "rowappear".
When you have a lot of complex rows it can drastically improve table loading. So the idea is that you create the rowData only with empty rows. Then on "rowappear" you create your custom view and add it to the row.
It works amazingly well. I still have to figure out why on android when loading the tableview, displayed cells first appear empty then fill themselves.
I add to fire the "reuse" event on the row itself, because of the ios implementation.
The "rowappear" event is fired on the tableview

I am willing to improve anything necessary to make this go through. But i think it can help people a lot! especially with tableviews.

Improved scrolling by only doing setRowData when data is actually different in getView
@negupta
Copy link
Contributor

negupta commented Jul 14, 2012

Signed CLA is in place.

@farfromrefug
Copy link
Contributor Author

JIRA ticket + test case
https://jira.appcelerator.org/browse/TC-1104

@krowley
Copy link
Contributor

krowley commented Aug 3, 2012

We don't accept pull requests to any branch other than master.

@negupta
Copy link
Contributor

negupta commented Aug 4, 2012

@farfromrefug - Please submit your PR on the master branch.

@farfromrefug
Copy link
Contributor Author

sure will do

@farfromrefug farfromrefug deleted the tableview_improvements branch December 27, 2012 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants