No need for the wrapped Lazy instance in image loading.#450
Conversation
|
Have you tested that this is the case? Thought it was used to allow faster loading |
The behavior should not change. I just implement the same logic without using Lazy |
|
I found a bug that when image is modifying quickly, it would be possible to trigger removing twice, which will result exception (index out of bound). Therefore, I add a small lock-liked mechanism to avoid that. |
Agree, will need to rework this error handling at some point in the future.
Will take another look later to see if it's related to my environment |
|
can we leave this for after 1.8.0? |
Sure, it's a minor change. |
|
havent looked at the code yet, just testing it so far and i am finding the speed of results and images are a lot faster 👍 |
That's interesting. I don't expect significant performance improvement for this pr, but just a small optimization and fix a potential logic issue. |
|
@pc223 Do you want to take a try whether this combine with #554 can resolve the freeze in debugger? Probably previously the slowness when debugger attached is because of the exception thrown when resizing imagecache. #554 is a simple change. Just change these few lines to achieve the same effect in #554. Flow.Launcher/Flow.Launcher/ViewModel/ResultsViewModel.cs Lines 302 to 308 in 5dd19bf |
Just tested, still the same behavior, seems this PR not related to the delay. Without #554, it freeze even with Release build no debugger. |
|
If with #554, will flow freeze when debugger attached? |
yes |
|
Ok, so probably it is some other reason I don't fully understand😂 |
Yeah, #554 is our only clue right now, still related to the number of items being updated at once I suppose. |
|
In my case it isn't working with enabled Program plugin. |
|
Yeah I will push #554. |
|
Weird.....Even with 15000 items, I won't encountered significant slowness at first run without #554. |
I have never been able to repro the delay in release or debug build. Only experiencing it in debug when I am running a virtual machine on my laptop but that's because the cpu and memory consumption is been eaten up by the VM. |
|
do we want to continue to merge this in so it's quicker to test pr 554 or is there some more changes you want to add @taooceros ? Maybe we can get this in with release 1.8.2 |
We can get this in release 1.8.2 because it does fix some logic issue. I don't have more change currently. |
|
Sounds will take a look at code soon and merge into 1.8.2 instead |
Just test with the new commits of this PR, without #554, still delay, with and without debugger. Combine this PR and #554, same behavior as before, delay with debugger, not delay without debugger. |

We don't need the Lazy instance to implement the behavior, which will remove some overhead.