Yes, I think that's the best advice for now.

Really, though, a good RFE would be to provide a way to adapt to the refresh rate of the monitor when vsync is being used. That's really the point of doing vsync in the first place.

-- Kevin

On 2/26/2025 10:17 AM, Johan Vos wrote:
Hi Glavo,

I believe setting the javafx.animation.pulse is indeed the best way to increase the render frequency (or to minimize the time between 2 pulses). It is independent of the hardware/pipeline being used. Of course, you may see a higher load in the JavaFX Application Thread and in the Quantum Renderer, but I guess you're aware of that -- but even at 10 fps those threads can be under pressure (same for the GPU cache).

- Johan


On Wed, Feb 26, 2025 at 7:01 PM Glavo <zjx001...@gmail.com> wrote:

    I found that setting `javafx.animation.pulse` to a higher value
    worked for me.
    I considered setting `javafx.animation.pulse` to 120 for all users
    to get smooth animation.
    Is this the most recommended approach at this time?

    Glavo

    On Wed, Feb 26, 2025 at 3:55 AM Glavo <zjx001...@gmail.com> wrote:

        Hi,

        Recently I was investigating how to improve the user
        experience of our JavaFX applications.
        I noticed that JavaFX applications seem to be limited to 60fps
        by default,
        which makes JavaFX applications appear to animate less
        smoothly than many other applications
        when users are using high refresh rate monitors.
        In particular, we used a self-drawn title bar, which caused
        users to drag our app more slowly than dragging other
        applications.

        I learned that there is an undocumented property
        `javafx.animation.fullspeed`
        and that setting it to true would significantly improve the
        user experience of our application.
        While it works fine on my computer, it seems to have a lot of
        potential problems,
        such as conflicts with vsync, may have significantly higher
        CPU/GPU utilization, and has been less tested,
        so I dare not push it to users.
        There is also a property `javafx.animation.framerate` which
        seems to be safer, but it didn't work for me.

        So, what is the best way to get a high frame rate for a JavaFX
        application?
        Can we get more than 60fps in a JavaFX application with vsync
        enabled?
        Is it possible to make JavaFX applications adapt to the
        monitor's refresh rate without us setting it to a fixed value?

        Glavo


Reply via email to