Opened 5 years ago

Closed 5 years ago

#16012 closed bug (fixed)

[HaikuDepot] is slow at populating All package list

Reported by: diver Owned by: apl-haiku
Priority: normal Milestone: R1/beta2
Component: Applications/HaikuDepot Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev54185 x86_64.

It takes HaikuDepot ~15 seconds to list All packages which is unacceptably slow.

Item count goes to 348 (for some reason it's always this number) after that it raises to 2540 then it resets to 0 and quickly increases to 2664. HaikuDepot was so much faster in beta1 *sigh*

Change History (6)

comment:1 by apl-haiku, 5 years ago

The sudden jump to zero packages is because of the code in MainWindow::_BulkLoadCompleteReceived then subsequently MainWindow::_AdoptModel;

fFeaturedPackagesView->Clear();
fPackageListView->Clear();

So it clears those two views and then reloads them with data. It is a bit tricky to prevent this quickly and easily because the same code path deals with the initial load as deals with applying filters as well as on-demand reloading later.

A long time ago with fewer packages this "reload everything" was probably seemingly instant, but with thousands of packages as you have observed it is no longer instant.

The interplay between the model and the UI could be improved to avoid the refresh. It would require some further investigation to find a good refactoring approach.

comment:2 by waddlesplash, 5 years ago

Following hrev54192 this is considerably improved; see what you think.

comment:3 by diver, 5 years ago

hrev54195 x86_64. Same ~15 seconds.

comment:4 by apl-haiku, 5 years ago

I've spent some time on this today and have made some good progress -- it seems to be going much much faster locally. I will do some work on it and hopefully get a PR in the next week.

comment:5 by diver, 5 years ago

Nice! Looking forward to it :)

comment:6 by apl-haiku, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.