#14513 closed bug (fixed)

[HaikuDepot] is extremely slow at populating the package list

Reported by: diver Owned by: stippi
Priority: normal Milestone: Unscheduled
Component: Applications/HaikuDepot Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

hrev52295+70+dirty.

Switched to beta1 for testing purposes using:

pkgman add https://eu.hpkg.haiku-os.org/haiku/r1beta1/$(getarch)/current

and I'm experiencing an extremely slow package list population in HaikuDepot. 20 packages per second. Also decorations (icons, images) don't show up. Created a separate issue about it https://github.com/aplgithub/haikudepotserver/issues/153

Attachments (2)

profile_english.txt (82.1 KB) - added by luroh 10 months ago.
profile_russian.txt (60.7 KB) - added by luroh 10 months ago.

Download all attachments as: .zip

Change History (10)

Changed 10 months ago by luroh

Attachment: profile_english.txt added

Changed 10 months ago by luroh

Attachment: profile_russian.txt added

comment:1 Changed 10 months ago by luroh

No network interface present, HaikuDepot working purely with cached data. Outputs from 'profile -f -i 100 HaikuDepot' attached.

Populating the list takes 3 seconds with English locale, 30 seconds with Russian.

Last edited 10 months ago by luroh (previous) (diff)

comment:2 Changed 10 months ago by diver

I have a bit different stats in VMware Fusion with 2 cpu's:
5 seconds with English locale, 110 seconds with Russian.

comment:3 Changed 10 months ago by waddlesplash

Milestone: R1/beta1Unscheduled

comment:4 Changed 10 months ago by apl-haiku

I am checking this with a test instance of HDS running locally with the following locales;

  • English
  • German
  • Russian

The time from HaikuDepot launch through to completed display of the main window seems to be the same for me across all three locales?

comment:5 Changed 10 months ago by luroh

Well, the word "completed" may be a bit ambiguous in this case. Pay attention to the small package counter on the left hand side. During my testing, it was way slower to finish counting the packages when using Russian locale instead of English.

comment:6 Changed 10 months ago by apl-haiku

The problem actually (mostly) seems to be with this little text field because it is constantly rendering the value and figuring out the plurals which I had previously learnt from Diver are more complex in Russian language than is the case in English.

static BStringFormat format(B_TRANSLATE("{0, plural, "
  "one{# item} other{# items}}"));

I can see that this can be sped-up by avoiding deriving this string many times; at least a couple of times for getting the size of the BView and once for rendering the text. This is achieved by not allowing the field to be dynamic, but by pre-choosing a 'sensible' upper limit to the count of packages for this label and fixing the size of the field. This is proabably acceptable for now and the speed seems to be quite a bit better. It will be good to hear how this goes for you.

An even better solution would be to delay the rendering of the label and to update it every second. However this is a bigger change.

Last edited 10 months ago by apl-haiku (previous) (diff)

comment:7 Changed 10 months ago by luroh

Patch set 1 in Gerrit fixes the problem with Russian for me (gcc2h, master).

Last edited 10 months ago by luroh (previous) (diff)

comment:8 Changed 10 months ago by waddlesplash

Resolution: fixed
Status: newclosed

Fixed in hrev52384 .

Note: See TracTickets for help on using tickets.