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

Initiating a scroll becomes laggy after the app has been running for a long time #77

Open
1000hz opened this issue Jul 13, 2023 · 14 comments
Labels
bug Something isn't working

Comments

@1000hz
Copy link

1000hz commented Jul 13, 2023

I've noticed that after the app has been running for a significant length of time (maybe a week or more?) there will start to be a significant lag when beginning a trackpad scroll gesture. It doesn't seem to be gradual; I'll just suddenly start noticing scrolling is severely lagging.

Scrolling won't start until about 700ms after the gesture, though once the scroll has started it remains smooth and responsive. Starting a new scroll gesture after the previous one has ended again suffers from a delayed start. Restarting MiddleClick restores performant scroll behavior.

I'm running MiddleClick 2.6.1 on macOS Ventura 13.4.1.

@artginzburg artginzburg added the bug Something isn't working label Jul 13, 2023
@artginzburg
Copy link
Owner

Thanks for taking the time to bring this up!

I'm experiencing the same issue. No clue why this happens yet.
Maybe there's a memory leak, or maybe the old listeners are not always being removed, and they end up competing. Or it may have something to do with this: gm-vm@0d509b7.

@khesed
Copy link

khesed commented Sep 1, 2023

significant length of time (maybe a week or more?)

Consistent on Sonoma often within the day

Restarting MiddleClick restores performant scroll behavior

Would you consider adding an auto-restart to the app on user login?

@Arecsu
Copy link

Arecsu commented Dec 3, 2023

Experiencing the same here as well. Happens after having the app open for a couple of days. Restarting the app fixes the issue. As described above, maybe a workaround is to auto-restart at user login. Don't know if that's possible though. A workaround nonetheless, but still better than nothing 😅

@Cox5
Copy link

Cox5 commented Jan 14, 2024

I have the same issue. Took me weeks to figure out it was related to this app. I hope the workaround isn't difficult to implement in a new version.

@paulora2405
Copy link

I'm also experiencing the same issue, currently on Sonoma 14.2.1. Restarting the app fixes the issue.

@Cox5
Copy link

Cox5 commented Jan 16, 2024

I'm also experiencing the same issue, currently on Sonoma 14.2.1. Restarting the app fixes the issue.

I updated to the latest version of Middleclick and so far, after 2 days and lots of closing/opening the lid, scroll is still smooth. Maybe the issue has been fixed in the new version, we'll see

@paulora2405
Copy link

paulora2405 commented Jan 22, 2024

I've managed to come up with a temporary solution to restart the app every few hours, here is how to do it:

In some directory in you home dir (mine was in ~/.local/scripts/middleclick_restart.sh) create a bash script, and put the following in it:

#!/bin/bash
killall MiddleClick
sleep 1
open -a MiddleClick

Make it executable with chmod +x middleclick_restart.sh.

Now create a LaunchAgent plist file in ~/Library/LaunchAgents/com.paulo.middleclick_restart.plist (replace paulo with your user), with the following inside:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <!-- REPLACE WITH YOUR USER -->
        <string>com.paulo.middleclick_restart</string>
        <key>ProgramArguments</key>
        <array>
            <!-- REPLACE WITH YOUR SCRIPT PATH -->
            <string>/Users/paulo/.local/scripts/middleclick_restart.sh</string>
        </array>
        <key>StartInterval</key>
        <integer>14400</integer>
    </dict>
</plist>

Note the absolute path to the script, do not use ~.

And now load it with launchctl by doing:

launchctl load -w ~/Library/LaunchAgents/com.paulo.middleclick_restart.plist

Now every 4 hours, the app will restart.

@ejerskov
Copy link

+1

@arhipy97
Copy link

arhipy97 commented May 1, 2024

Are there any updates?

@Chakubikulus
Copy link

+1 Still does this at random intervals it seems, it lags the whole computer after a while

@bhajneet
Copy link

This issue currently has the most thumbs ups and is still open. @artginzburg I see above in the comments that the cause was unknown in 2023, and just wondering now if you've gotten any more insight in 2024?

I rely on this program and personally was able to "solve" the problem by using the method in @paulora2405 's comment, but this issue stops me from recommending the program to others who are not as technically savvy

@alexchexes
Copy link

Bump. Please fix this so we don't buy overpriced proprietary solutions.

@alexchexes
Copy link

alexchexes commented Jul 5, 2024

And does anyone know if @paulora2405's solution works when working with multiple users? For example, I have two users and both are logged in. Should I create and run the scripts in both of them? Will it automatically restart the app inside a user that is currently switched-out (but still logged-in)?

@alonmln
Copy link

alonmln commented Jul 22, 2024

This happens to me as well. I also noticed it happens more often if I have MiddleClick and Scroll Reverser 2 working at the same time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests