Skip to content

Mouse clicks cause performance spikes #121

@lshoek

Description

@lshoek

To reproduce, add this to helloworld demo update():

if (deltaTime > 0.01)
    Logger::info("%.06f", deltaTime);

Replace 0.01 for some value that's about 5-10 times of your frame average.

Clicks inside the render window in helloworld demo

  • in Debug mode seems to cause 10-16ms lag spikes (eyeballed normal frame time median 0.13-0.16ms)
  • in Release mode generate the same lag spikes but less often (eyeballed normal frame time median ~0.05ms)

Hardware

  • RTX 5070 Ti
  • AMD Ryzen 9 9900X3D

The spikes happen after clicks only and are significant enough to not be classified as jitter. I first noticed this in another project that computes a costly simulation based on GPU feedback. What's interesting is that the lag frame is always followed by a fast frame, leading to noticeable artifacts in the simulation.

I plotted what that looks like (frame index on x-axis)
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions