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

数据量大的时候卡顿问题 #24

Open
DarkSherlock opened this issue Jul 10, 2017 · 1 comment
Open

数据量大的时候卡顿问题 #24

DarkSherlock opened this issue Jul 10, 2017 · 1 comment

Comments

@DarkSherlock
Copy link

有一个奇怪的现象,当数据量比较大的时候, 前面的数据滑动起来不算太卡,但是如果一直往下滑动到接近底部的地方,就会出现卡顿现象, 看了Monitors,发现内存并无太大起伏,但是CPU曲线当滑动到底部的时候就很次CPU,导致滑动卡顿, 请问这现象有没有办法解决.

@x200516
Copy link

x200516 commented Dec 24, 2023

MajorRecyclerViewAdapter.java中的adapterList没有实时清理,比较笨的办法在adapterList.add之前移除相同的verticalPosition
Iterator iterator = adapterList.iterator(); while (iterator.hasNext()) { ContentRecyclerAdapter a = (ContentRecyclerAdapter<?>) iterator.next();
if (a.verticalPosition == position) {
iterator.remove();
break;
}
}
//上面代码是新增的
adapterList.add(contentRecyclerAdapter);

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

No branches or pull requests

2 participants