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

性能问题考量 #101

Open
FreestyleDDCoder opened this issue Sep 2, 2024 · 0 comments
Open

性能问题考量 #101

FreestyleDDCoder opened this issue Sep 2, 2024 · 0 comments

Comments

@FreestyleDDCoder
Copy link

展开的适配器有很多的for循环,例如在onBindViewHolder当中的judgeType方法,时间复杂度o(n),这也就意味着当数据量大时(我设置为100组,100子项就会很卡了),拖动会存在着性能问题。ExpandableAdapter为真实列表,GroupRecyclerViewAdapter来控制具体显示哪一项。可以尝试把查找等时间复杂度往o(1)方向靠拢,例如有张映射关系表,实际的列表和显示的列表进行相互映射出下标位置等。

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

1 participant