#14513: [HaikuDepot] is extremely slow at populating the package list
---------------------------------------+----------------------------
Reporter: diver | Owner: stippi
Type: bug | Status: new
Priority: normal | Milestone: Unscheduled
Component: Applications/HaikuDepot | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
---------------------------------------+----------------------------
Comment (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.
--
Ticket URL: <https://dev.haiku-os.org/ticket/14513#comment:6>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.