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

Laggy dragging on 1903 #22

Open
reycn opened this issue Oct 2, 2019 · 14 comments
Open

Laggy dragging on 1903 #22

reycn opened this issue Oct 2, 2019 · 14 comments

Comments

@reycn
Copy link

reycn commented Oct 2, 2019

Hi,

[Issue] Ewc is literally slow when dragging arcylic windows.
[Tried] 1. updated to electron@latest; 2. updated to windows-build tools 2019 with 18362 SDK.
[Request] If possible and willing,

  • any explanation on the machanism casusing such problem;
  • a more efficient module on dragging

Thanks for your efforts. :)

@reycn reycn changed the title Slowly dragging on 1903 Dragging slowly on 1903 Oct 5, 2019
@23phy
Copy link
Owner

23phy commented Oct 8, 2019

Well hello there, I suppose this is the same as #16. I have no idea why is this, and I cannot reproduce it, as I am on 1809 update. I'll update my windows soon and test again. Lately, windows updates break things on users machine 🤷🏻‍♀️

@reycn
Copy link
Author

reycn commented Oct 16, 2019

Thanks for your effort. :)

@reycn reycn changed the title Dragging slowly on 1903 Laggy dragging on 1903 Feb 17, 2020
@reycn
Copy link
Author

reycn commented Feb 17, 2020

Well hello there, I suppose this is the same as #16. I have no idea why is this, and I cannot reproduce it, as I am on 1809 update. I'll update my windows soon and test again. Lately, windows updates break things on users machine 🤷🏻‍♀️

It turns out that it may be a bug related to mouse polling frequency on 1903. Simliar questions, explanation, ang temporary solutions here.

@23phy
Copy link
Owner

23phy commented Feb 17, 2020

Unfortunately I cannot update my windows (due to windows update bugs) to that version to experience that issue. It may be fixed by Microsoft themselves.

@reycn
Copy link
Author

reycn commented Feb 18, 2020

Unfortunately I cannot update my windows (due to windows update bugs) to that version to experience that issue. It may be fixed by Microsoft themselves.

Ture and I highly recommend that DO NOT UPDATE... 😂

@PegasisForever
Copy link

For me, the lag only happends when set to "arclic", but not "blur behind".
No idea what causes this.

But I think a workaround is possible to fix this?
Just increase the blur radius of "blur behind" (Don't know if this is possible)
and add a 50% translucent black div on top of it (Tried, this can work)

No change to package.json.
Windows 10 Pro 1909

@reycn
Copy link
Author

reycn commented Feb 26, 2020

For me, the lag only happends when set to "arclic", but not "blur behind".
No idea what causes this.

But I think a workaround is possible to fix this?
Just increase the blur radius of "blur behind" (Don't know if this is possible)
and add a 50% translucent black div on top of it (Tried, this can work)

No change to package.json.
Windows 10 Pro 1909

ACCENTPOLICY is provided by MS which pre-defines radius.

@reycn
Copy link
Author

reycn commented Mar 16, 2020

It seems that pack KB4541738 of Win 10 2004 fixed this bug.

@Toby56
Copy link

Toby56 commented Mar 16, 2020

Doesn't seem to have for me:

image

@Toby56
Copy link

Toby56 commented Mar 16, 2020

I have this fix which disables the acrylic when dragging using a debounce function. It just changes it to a blur behind when dragging, but you can do whatever you want with that:

// Debounce function:
function debounce(func, wait, immediate) {
  var timeout;
  return function() {
    var context = this,
      args = arguments;
    var later = function() {
      timeout = null;
      if (!immediate) func.apply(context, args);
    };
    var callNow = immediate && !timeout;
    clearTimeout(timeout);
    timeout = setTimeout(later, wait);
    if (callNow) func.apply(context, args);
  };
}

// Functions for disable and re-enable:
const disableAcrylic = debounce(
  () => {
    ewc.setBlurBehind(win, 0xdd222222);
  },
  50,
  true
);

const enableAcrylic = debounce(() => {
  ewc.setAcrylic(win, 0xbb000000);
}, 50);

enableAcrylic();

// Event listeners:
win.on("move", () => {
  disableAcrylic();
  enableAcrylic();
});

win.on("resize", () => {
  disableAcrylic();
  enableAcrylic();
});

Search up js debounce function to see how that part works.

@PsyVeteran
Copy link

I have found a 2 click solution for this issue in the meantime.
toggling off the "show windows content while dragging" toggle item in the Windows visual performance removed whatever causes this. Video attached to show the effects clearly.

drag.mp4

@ghost
Copy link

ghost commented Jan 11, 2022

i have this issue on my desktop but not on my laptop. have tried setting the polling frequency to match my laptop mouse, but although this helps a little it's still pretty bad.

@2wons
Copy link

2wons commented Jan 30, 2022

disabling transparency effects (settings > personalization > colors), seems to be another work around for the problem. Though a big downside is you lose all the nice acrylic transparency from windows ( taskbar & wt terminal).

@joshgrift
Copy link

Supposedly fixed in Windows 11: https://forum.obsidian.md/t/translucent-window-setting-results-in-increasingly-laggy-window-drag-movements-as-mouse-polling-frequency-increases/6829/34

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

No branches or pull requests

7 participants