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

Maybe introduce a caching mechanism on DividerItemDecoration #99

Closed
fondesa opened this issue May 18, 2020 · 1 comment
Closed

Maybe introduce a caching mechanism on DividerItemDecoration #99

fondesa opened this issue May 18, 2020 · 1 comment
Labels
enhancement Introduces a new feature, a behavior change or a performance change

Comments

@fondesa
Copy link
Owner

fondesa commented May 18, 2020

It would be nice to find a reliable way to cache the Grid and the Divider instances used in DividerItemDecoration.getItemOffsets() and DividerItemDecoration.onDraw().

In case, add a method on DividerBuilder to toggle this feature.
Should it be enabled or disabled by default?

@fondesa fondesa added the enhancement Introduces a new feature, a behavior change or a performance change label May 18, 2020
@fondesa
Copy link
Owner Author

fondesa commented May 31, 2020

It's not worth it for the following motivations:

  • it would make the internal implementation more complex
  • there aren't performance issues ATM

@fondesa fondesa closed this as completed May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Introduces a new feature, a behavior change or a performance change
Projects
None yet
Development

No branches or pull requests

1 participant