Fuzzy search how to speed up process on startup?

hi, I configured the fuzzy search node linked to a listbox (imGui) to carry out searches on a spread with around 9000 elements, the search works well and the latency is acceptable… but when I start the sketch there are big loading problems, first It takes up to 40 seconds to see the list appear…Can anyone help me?

Yo, have a repro patch to share?

Thanks

Hi @sebescudie, yes here it is.
Thanks to you!
list.zip (42.2 KB)

I think the problem is inside “Search” node of fuzzy Search:
I noticed that if the “List to Search” pin is detached there is no loading problem while if attached to a list when you start the sketch the writing Skia (Not Responding) is on the title of the window and it remains until that the list is not digested by fuzzy Search (in this case 30/40 seconds).

For now as a temporary solution I created a group where in the first layer there is a “Loading” writing while the second is connected to the ImGUi node. So as long as the fuzzy search remains busy blocking the ImGui node the writing remains… I don’t really like the solution also because the “Not responding” writing on the title still. Do you have any better suggestions? Thanks

i’m still on this problem, maybe if there is a way to put the list loading process to async mode things could be better. Anyone can please suggest me a way to do that?

Since the your list is quite extensive it takes a long time to build the pre-processor. Just wrapped the stuff in a couple of AsyncTasks, can be further optimized for sure.

SearchAsync.7z (41.9 KB)

Btw: Do yourself a favor and tidy up your patches.

1 Like

Thank you so much @bjoern in this way the loading time is acceptable and skia renderer window is no longer stuck on startup!

I’ll tidy all I promise ;)