Giter Site home page Giter Site logo

Comments (4)

Waitsnake avatar Waitsnake commented on June 8, 2024

I investigate the problem a bit further:

  • when starting the "background mode" from Terminal window directly with "/System/Library/CoreServices/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -window" there is no lagging at all -> lagging seams related to starting it from launchd as a daemon instead of a normal user program
  • tried changing process priority handling with "nice" and "renice", but this do not change anything -> it is not an process priority problem
  • I suspect something with the timing events of the ScreenSaverView that fires "animateOneFrame" method is odd when startet as daemon with launchd. Timing Events seams to collected over a period and then all fired together over a short time. I think I remember Craig Federighi presented this feature called "Timer Coalescing" years ago for 10.9 on a keynote and they use it to save energy. Seams they use it only for daemons (started by launchd I use it for the start of the background mode) and never for normal user programs (like starting it from Terminal as user).

from animatedgif.

Waitsnake avatar Waitsnake commented on June 8, 2024

I investigate the "Timer Coalescing" trace a bit further:

  • disabling "Timer Coalescing" systemwide by use of "sudo sysctl -w kern.timer.coalescing_enabled=0" -> This completely solve the issue and I see no more lags! -> Anyway, but doing this systemwide is not an option, since this will drain battery too much and also needs admin rights. -> But it shows that "Timer Coalescing" is really the problem here!
  • I tired to disable "Timer Coalescing" only for the Screensaver by using launchd option "LegacyTimers" set to "true" -> unfortunately this makes no difference! According to older descriptions this option should have worked? -> Maybe Apple broke this option years ago?

from animatedgif.

Waitsnake avatar Waitsnake commented on June 8, 2024

I investigate the "LegacyTimers" trace a bit further:

  • looking for official description of launchd configuration with "man launchd.plist" shows, that "LegacyTimers" set to "true" only works when a second option "ProcessType" is set to "Interactive" -> This solve the issue and I see no more lags! And now we only did it for the screensaver and not system wide.

from animatedgif.

Waitsnake avatar Waitsnake commented on June 8, 2024

Fix will come with next release.

from animatedgif.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.