• SysListview32 slow population means search-by-keyboard doesn't work any

    From R.Wieser@21:1/5 to All on Fri Nov 18 14:48:09 2022
    Hello all,

    I've got a listview in ownerdata mode, in which the generation of that ownerdata (thumbnails) is rather slow. As a result the listviews own
    searching for a (thumbnails) name doesn't work anymore, as the end-of-word delay times out before the (re)population is finished.

    That means that when I try to search for "abc" the slow repopulation kicks
    in after I've pressed the "b" key, doesn't recognise more characters being typed because of the slow population, sees a long delay between "b" and "c" being recognised which exeedes its "word restart timeout", and than happily restarts the search starting with "c".

    My question: How do I change, for that one listview, the "word restart
    timeout" value. Although I've tried several keywords and combinations
    thereof I've not been able to find anything. :-(

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to R.Wieser on Sat Nov 19 02:42:14 2022
    On Fri, 18 Nov 2022 14:48:09 +0100, R.Wieser wrote:
    Hello all,

    I've got a listview in ownerdata mode, in which the generation of that ownerdata (thumbnails) is rather slow. As a result the listviews own searching for a (thumbnails) name doesn't work anymore, as the end-of-word delay times out before the (re)population is finished.

    That means that when I try to search for "abc" the slow repopulation kicks
    in after I've pressed the "b" key, doesn't recognise more characters being typed because of the slow population, sees a long delay between "b" and "c" being recognised which exeedes its "word restart timeout", and than happily restarts the search starting with "c".

    My question: How do I change, for that one listview, the "word restart timeout" value. Although I've tried several keywords and combinations thereof I've not been able to find anything. :-(

    Regards,
    Rudy Wieser

    The LVN_GETDISPINFO notification needs to be handled to provide the item
    text. There are also other notifications which should be handled for virtual ListView.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Sat Nov 19 07:50:41 2022
    JJ,

    The LVN_GETDISPINFO notification needs to be handled to provide the
    item text.

    I see I did not make myself completely clear.

    The problem occurs *after* the listview has been initially populated (that
    part works) and I try to type the name of one of the thumbnails to find-and-select it.

    There are also other notifications which should be handled
    for virtual ListView.

    If you could point out which one/ones has/have something to do with the search-by-keyboard problem I would appreciate it.

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to R.Wieser on Sat Nov 19 16:16:16 2022
    On Sat, 19 Nov 2022 07:50:41 +0100, R.Wieser wrote:

    If you could point out which one/ones has/have something to do with the search-by-keyboard problem I would appreciate it.

    All of the requirements for the virtual list functionalities needs to be fullfilled first. Otherwise the list view won't know what text an item has,
    in order to be looked up on using keyboard.

    https://learn.microsoft.com/en-us/windows/win32/controls/use-virtual-list-view-controls

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Sat Nov 19 10:45:13 2022
    JJ,

    All of the requirements for the virtual list functionalities needs
    to be fullfilled first. Otherwise the list view won't know what text
    an item has, in order to be looked up on using keyboard.

    You're concentrating on the wrong things I'm afraid.

    As I wrote, the problem is not the searching itself, but that it decides
    that, due to a timeout, I'm starting a new search when I'm not.

    Or, to put it differently : I *can* do a search when I use a small dialog showing just a few thumbnails (read: the repopulation is finished quickly),
    but I *can't* when I go fullscreen, showing 28 of them (read: the
    repopulation takes a while).

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to R.Wieser on Sat Nov 19 18:07:19 2022
    On Sat, 19 Nov 2022 10:45:13 +0100, R.Wieser wrote:

    You're concentrating on the wrong things I'm afraid.

    As I wrote, the problem is not the searching itself, but that it decides that, due to a timeout, I'm starting a new search when I'm not.

    Or, to put it differently : I *can* do a search when I use a small dialog showing just a few thumbnails (read: the repopulation is finished quickly), but I *can't* when I go fullscreen, showing 28 of them (read: the repopulation takes a while).

    Regards,
    Rudy Wieser

    The rendered images should be cached and be stored as part of the items'
    data for quick retrieval.

    If you want a more responsive UI, render the item's image in a background thread instead of the window handler's thread. When done, notify the window handler's thread to update the list item's display.

    When the item dimension is changed, e.g. if the list view is for displaying image thumbnails and the thumbnail size is changed, rerender the item
    images.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Sat Nov 19 15:58:30 2022
    JJ,

    The rendered images should be cached and be stored as part of the
    items' data for quick retrieval.

    Whould you mind it very much to first try to help me find an answer to my question to how to influence the keyboard timeout for the listviews search function ?

    You see, that one would probably solve al my problems in a way that has
    likely the least ammount of side effects (as always, I do not mind to be
    shown to be incorrect here).

    What I mean ? Your "caching" solution just moves the delay to the start of
    the program, causing a "go brew some coffee and drink it" delay there. If
    you mean I should pre-generate them than you introduce a "how do I keep them
    in sync" problem.

    Both solutions either need a lot of memory (caching using an imagelist) or quite a file (caching them in a "database" of sorts).

    If yoiu are thinking of storing the thumbnails back into the image files
    they came from than that has its own problem : not all image formats allow
    it.


    My own idea for I can't get a hold on that keyboard timeout I will probably just generate-and-load the first matching thumbnail, and only (lazy) load
    the other thumbnails after a keystoke timeout (which I wil try to set a bit longer than the "end of search word" timeout - watever it is).


    IOW, I've been thinking about how to solve the problem myself before even considering posting here. And for some odd reason I would like to try to go thru them starting with the simpelest, easiest and least side-effects one
    first - and than, if needed, work my way up. :-)

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to R.Wieser on Sun Nov 20 00:24:11 2022
    On Sat, 19 Nov 2022 15:58:30 +0100, R.Wieser wrote:

    Whould you mind it very much to first try to help me find an answer to my question to how to influence the keyboard timeout for the listviews search function ?

    The timeout is defined and handled by the ListView's built in handler, which
    is not exposed as API. What you want is thinkering with (undocumented)
    software internals which may vary between software versions.

    What I mean ? Your "caching" solution just moves the delay to the start of the program, causing a "go brew some coffee and drink it" delay there.

    I did mentioned to generate the rendered image in a background thread. Only
    the images. Not including the item's text. The image generation would not
    block or interfere the window handler's thread, since it's run in other
    thread. Even if it's run on a single core CPU, the background thread can be
    set to use a lower priority.

    Both solutions either need a lot of memory (caching using an imagelist) or quite a file (caching them in a "database" of sorts).

    Is the displayed image for each ListView item really THAT big? Like... half
    of a screen?

    If yoiu are thinking of storing the thumbnails back into the image files
    they came from than that has its own problem : not all image formats allow it.

    I never suggested that, considering that file system storage is slower than RAM. Performance, and memory usage usually don't agree with each other.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Sat Nov 19 20:26:45 2022
    JJ,

    The timeout ... is not exposed as API.

    That is what I needed to hear. I would have /liked/ to hear that I
    overlooked something and how to do it, but the above is second best.

    It means that I can stop thinking about & search for it, and focus on other possible (but more complex) methods.

    I did mentioned to generate the rendered image in a background thread.

    I just took a peek at your past messages (I could have missed it as I was focussed on getting the timeout question answered), but I do not see it.

    But yes, thats something I did not even think about. I'm not at all sure
    about how I would/should manage aborts of such retrievals though (when the listviews contents change while its still filling images in).

    Both solutions either need a lot of memory (caching using an imagelist)
    or
    quite a file (caching them in a "database" of sorts).

    Is the displayed image for each ListView item really THAT big? Like...
    half of a screen?

    No, they are small(ish) (placed 7 wide, 4 high when at fullscreen). But as they are many it ofcourse adds up.

    If yoiu are thinking of storing the thumbnails back into the image files
    they came from than that has its own problem : not all image formats
    allow
    it.

    I never suggested that,

    No, you didn't. I provided it as something that went thru my mind as one of the possibilities to store thumbnails (in a way which needs the least
    ammount of bookkeeping).

    Thanks for telling me that I can't do anything with the timeout (I really needed that).

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)