Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2-3 seconds lag in displaying overview #166

Open
dsp0105 opened this issue Feb 15, 2018 · 25 comments
Open

2-3 seconds lag in displaying overview #166

dsp0105 opened this issue Feb 15, 2018 · 25 comments
Assignees
Labels

Comments

@dsp0105
Copy link

dsp0105 commented Feb 15, 2018

I am using 7-8 virtual desktops and when I try to see the desktop overview, I notice a 2-3 seconds lag,

Wondering if it can be optimized, if it is not already done :)

Optimization I am thinking is that of keeping a cached one and then comparing it with current one.

Thanks for a wonderful product, I feel good about it when I use it through out the day 👍

@mzomparelli
Copy link
Owner

I have experienced this as well and it does appear to be directly related with the number of open windows. It is quite annoying. I'll see what I can do. I'm tinkering with it now and I think I'm on the right track.

@mzomparelli mzomparelli self-assigned this Feb 15, 2018
@dsp0105
Copy link
Author

dsp0105 commented Feb 15, 2018

Wonderful fast response! It feels great to have the software dev prescient about user's issues :D

One tip, I noticed is that, if I restart the system then it becomes better. I am thinking memory leak
or it could be Win10 getting slow after being up for a while too :)

Just to rule out system being slow, my system is highly optimized for fast response and re-imaged quite regularly.

@mzomparelli
Copy link
Owner

mzomparelli commented Feb 15, 2018

I don't think it's a memory leak. That can usually be detected using task manager if you enable the User Objects column on the Details tab. If you see this value continuing to grow then there may be a memory leak. It its current state it recreates every thumbnail every time. I'm testing a solution for storing the window thumbnail in memory until the window is closed.

Also, if it were a memory leak then it would start to mess with the other functions. I haven't noticed anything with hotkeys while this was an issue for DesktopView. There were memory leaks in DesktopView and it did in fact crash the application eventually. It depended how much you used DesktopView. Those have been fixed though.

image

@mzomparelli
Copy link
Owner

mzomparelli commented Feb 15, 2018

How many zVirtualDesktop user objects do you see in task manager?

@dsp0105
Copy link
Author

dsp0105 commented Feb 15, 2018

I see only one

@dsp0105
Copy link
Author

dsp0105 commented Feb 16, 2018

Sorry, I misread you question.
I see 350 user objects for zVD and Memory usage of 20M

@mzomparelli
Copy link
Owner

Thanks, that value is within range of where it should be. If you see that get past 1,000 then there is a problem.

Caching the windows is tricky. Handles are allowed to be reused and I can't rely on handle and window caption due to apps like Chrome changing the caption when you switch tabs. A possible solution I'm looking at is using a composite key of window handle and application. I think this may be enough to avoid window caching confusion. Let me know if you have any suggestions.

@dsp0105
Copy link
Author

dsp0105 commented Feb 16, 2018

Thanks for the explanation. I see the count start at 325 and goes upto 350 but nothing like 1000.

I had some doubts about how to do caching, since u need to display the image of the application in the desktop overview. Do you think that will be covered by your logic?

@mzomparelli
Copy link
Owner

mzomparelli commented Feb 16, 2018

The displaying of the image itself is no problem and caching wouldn't affect this. In case you're interested I use DWM (Desktop Window Manager) to get the thumbnail image which is a live preview. This is the very same technology that displays a live preview when you mouse hover a taskbar button. The exact Win32 call is DwmRegisterThumbnail

@dsp0105
Copy link
Author

dsp0105 commented Feb 17, 2018

Thanks, good to know, I am a embedded programmer but not familiar with win sys api.

@mzomparelli
Copy link
Owner

I have not forgotten about this. I just haven't figured out the way i want to handle. I understand 2-3 seconds is a long time to wait for DesktopView to open.

The concept seems trivial, but implementing it is a little more tricky.

I'm sure you realize this...this is only a side project for me. By day I do supply chain engineering and analytics. I care about zVD a lot. I've just been really busy lately with my other work and my son's school stuff.

@dsp0105
Copy link
Author

dsp0105 commented Apr 5, 2018

No problem, I understand, really love the product! 👍

@mzomparelli
Copy link
Owner

Since fixing the issue where DesktopView would hang if a window was unresponsive this lag should have gotten better.

How is it for you lately? The more windows you have open the longer it will take to open DesktopView. From my experiences it's faster than when you opened this issue.

@dsp0105
Copy link
Author

dsp0105 commented Jan 6, 2019

Thanks Michael for checking back, it is laggy (not very slow luckily) especially when I have 4-5 desktops each having 2-4 windows.

In the same scenario, Windows Win+Tab is fast, why is that?

This can turn into a deal breaker if it becomes too slow :( then I would have to use Win+TAB

@mzomparelli
Copy link
Owner

I have the opposite problem. TaskView is slower than DesktopView for me.

What are the specs of your machine?

@dsp0105
Copy link
Author

dsp0105 commented Jan 6, 2019

Hmm...Mine has pretty high spec. Core i7, 3.6 GHz, SSD, 20GB RAM, Win 10

@mzomparelli
Copy link
Owner

My computer is only slightly better. I have quite a few windows and it opens in a second.

image

image

@dsp0105
Copy link
Author

dsp0105 commented Jan 7, 2019

I see, ok, I stiill see a lag even with 1desktop and 7 windows open.

  1. May be you can optimize the loading by pre-building your list every 100ms and caching the prev list
    This you can do for current active desktop to avoid overloading CPU maybe

  2. I think, the windows list for your preview will be mostly stale/old values,

Please let me know your thoughts

@mzomparelli
Copy link
Owner

I think the issue comes from creating the thumbnail control. I would have to build a list of those controls for this to work. I feel like if Microsoft's TaskView were to show every window across all desktops it would have a similar problem. Currently TaskView only shows the windows that are on the current desktop.

I'll see what I can do about this, but I can't say how long it'll take to resolve this for you. I'm really sorry and hope that it works well enough overall for you to continuing using zVD.

@mzomparelli
Copy link
Owner

I have noticed a lag sometimes though and I was thinking it only happened when certain applications has focused prior to opening DesktopView. I'll keeps notes when I see it. Maybe this issue correlates to certain applications. Sounds strange, I know.

@dsp0105
Copy link
Author

dsp0105 commented Jan 8, 2019

sure, thank you

@mzomparelli
Copy link
Owner

I just noticed that when I'm on an empty desktop it takes DesktopView longer to open. I'm digging into why this is happening. Hopefully this leads to a fix. I'll keep this issue updated as I progress.

@dsp0105
Copy link
Author

dsp0105 commented Jan 14, 2019

Good observation! I see the same! The lag is very high if I have a empty desktop.

@dsp0105
Copy link
Author

dsp0105 commented Jan 18, 2019

Hi Michael,
Wondering if you were able to figure out the reason for lag.

One thing, I noticed is that, after restarting the system, zVD is snappy even with empty desktops.

@mzomparelli
Copy link
Owner

Thanks for that info. I will test more tonight. I’ve been out of town this week and flying home this morning so I haven’t looked into this much yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants