Closed daanzu closed 4 years ago
Hey @daanzu can you explain a little bit what your patch does and how does it speed things up ? Do you have any measurable tests to share ? Thanks for sharing !
re: @elig0n (https://github.com/kvakulo/Switcheroo/issues/117#issuecomment-629730115)
Did @daanzu speed improving patches showed noticeable improvement for you ? Let me know as I might soon enough merge them. You can also comment
Very much so! Night and day difference! I currently have about 100-120 windows open, and it still takes about 500-1000 ms for the popup to open, so it's still not instant which would be ideal, but it's much much better than kvakulo's version. Which took for the same amount of windows about 10x as much, i.e. 5-10 seconds, which made it borderline unusable for me.
To still eschew those 500-1000 ms, perhaps we could do the following?
(Meanderings incoming, and I am definitely in favor of this merge happening even in its current state without us having to do anything that I subsequently describe; let us not let the perfect be the enemy of the good!)
I've read somewhere, perhaps from the pen of daanzu, that the whole reason this slowdown happens in the first place is some kind of cache that has to be invalidated every hour, and it is/can be costly to re-retrieve the info. His PR AFAIU speeds up this re-retrieval to a large extent without making it instant, but what if we also just did this re-retrieval quietly in the background every hour on our own? That means we would always have fresh data, and the user would never have to wait for the popup, no? If there is wasted CPU-cycles concern associated with this approach, it could be optional too.
https://github.com/kvakulo/Switcheroo/pull/118
I am happy to see and actively maintained fork!