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

[Stats Refresh] Investigate Stats parsing performance #11360

Closed
jklausa opened this issue Mar 28, 2019 · 5 comments
Closed

[Stats Refresh] Investigate Stats parsing performance #11360

jklausa opened this issue Mar 28, 2019 · 5 comments

Comments

@jklausa
Copy link
Contributor

jklausa commented Mar 28, 2019

During testing, I've found some operations can take painfully long time to finish in the new Stats architecture — e.g. viewing a list of referres for a whole year takes ages.

Fetching summary also takes very long time, as mentioned by @ScoutHarris.

We need to profile this and fix the issues.

@jklausa
Copy link
Contributor Author

jklausa commented Mar 28, 2019

At first glance it seems it's not due to parsing at all, but rather UIKit is doing something really bizarre...

Note the runtime in minutes!!!

Like it's trying to display millions of row at the same time?
Screen Shot 2019-03-28 at 04 28 17

@jklausa
Copy link
Contributor Author

jklausa commented Mar 28, 2019

(to be fair, the runtime is much less dramatic when not being instrumented... but still.)

@jklausa
Copy link
Contributor Author

jklausa commented Mar 28, 2019

So I think I know what is going on here.

@ScoutHarris I think there's some work required on how the details screen are displayed.

Right now it's just a single UITableViewCell (TopTotalsCell) that has a UIStackView that contains all the items in it. This works fine for a small amount of objects, but breaks down rather... badly for lists with HUGE count of items in it. Displaying "Clicks" for the past year for en.blog causes the cell to grow to almost 40000pt in height.

Turns out, iOS doesn't handle trying to render bitmaps this large well :D

I think we need to make this use actual UITableViewCells, instead of the "fake" ones in the UIStackView.

@ScoutHarris ScoutHarris changed the title Investigate Stats parsing performance [Stats Refresh] Investigate Stats parsing performance Apr 15, 2019
@jklausa jklausa removed their assignment Apr 16, 2019
@ScoutHarris
Copy link
Contributor

Created #11657 for the summary. I'll address the StackViews with a series of PRs.

@ScoutHarris
Copy link
Contributor

All details views have been fixed on referenced PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants