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

It become too slow when I add much page. #35

Open
caizhx opened this issue May 24, 2018 · 0 comments
Open

It become too slow when I add much page. #35

caizhx opened this issue May 24, 2018 · 0 comments

Comments

@caizhx
Copy link

caizhx commented May 24, 2018

In sample app, when I add 20 pages, it become very very slow and completely unusable.
I found it's caused by a line code in InkPageIndicator.drawUnselected(Canvas canvas).
......
// draw any settled, revealing or joining dots
for (int page = 0; page < pageCount; page++) {
int nextXIndex = page == pageCount - 1 ? page : page + 1;
Path unselectedPath = getUnselectedPath(page,
dotCenterX[page],
dotCenterX[nextXIndex],
page == pageCount - 1 ? INVALID_FRACTION : joiningFractions[page],
dotRevealFractions[page]);
unselectedPath.addPath(combinedUnselectedPath);
combinedUnselectedPath.addPath(unselectedPath);
}
......

I don't known why the bold line is need there? but when I delete it, this issue disappeared.
the bold line and the under line, seem will add some circle paths to the final draw path very much times, so it cause this issue.

Please pardon my poor english!

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