[PATCH v2 1/4] shell32/autocomplete: Implement a cache and sort the enumerated strings for proper behavior

Gabriel Ivăncescu gabrielopcode at gmail.com
Thu Oct 25 10:10:17 CDT 2018


On Thu, Oct 25, 2018 at 5:58 PM Huw Davies <huw at codeweavers.com> wrote:
>
> Not if you grow the alloc size exponentially.
>
> Huw.
>

Yeah, that makes sense, but are you sure you want me to do that?
Here's my reasoning as to why:

Since this code is there and isn't *too* difficult as it is (I hope?),
plus it's also better for the (eventual?) merge sort patch, since it's
much more flexible than other sorts, so that would have to either be
split later or make the pending patch a larger patch to change the
realloc to the chain of blocks if we go with it. (it's friendly to the
cache since it sorts pairs from the end first, the last items in the
cache will be the first ones, where the sort will start from)

I *know* that currently it doesn't mean much, but it will be easier on
me for later pending patches already done, that's why I'm
asking/hoping to change your mind just on this one.

As a side note, since the patches don't really show it: I tried many
different methods for the enumeration (because I was getting
unacceptable performance/slugginess for my use-case) but I ended up
with the situation you saw originally due to profiling and I found out
the hard way why bottom-up merge sort is really bad for performance in
the process... :-)



More information about the wine-devel mailing list