Open malcolmstill opened 6 years ago
Okay, so I've looked into this a bit more. I'd wondered if:
I was leaking resources on the Common Lisp side of things. Conclusion, I'm not. WL-RESOURCE
objects seem not to be monotonically increasing (apart from WL-REGION
s on weston-terminal
there is a bunch of clean up I need to do for object destruction but for this, i.e. weston-simple-egl
the only objects being created as it runs are callbacks and I am properly disposing of these.
I was leaking wl_resource
on the libwayland
side. I added wl-client-for-each-resource
to cl-wayland
. This allows me to iterate over all the resources for a given client on the libwayland
side. I set up a wee counter and saw that my wl_resource
s are not increasing monotonically for any clients (when running weston-terminal
and weston-simple-egl
). Just to confirm how the wl_resource
s work I removed the wl-resource-destroy
call where I clean up callbacks and lo and behold wl-client-for-each-resource
shows that for the weston-simple-egl
client that the resource list just increases and increases as it runs.
I checked if this performance leak was existent on ulubis-sdl
. It is not, ulubis-sdl
will quite happily render at 60 FPS when running weston-simple-egl
. This implies my Wayland code is sound, the performance leak is not to do with that.
What this suggests is the performance leak is in my DRM/KMS/GBM code. I wonder if I time different parts of the page flip code whether I'd see one call taking longer and longer. Or maybe the time between receiving page flip events might just increase.
I'd also wondered whether my Mac Mini was just overheating and was just being clocked down. However, if I stop weston-simple-egl
after a while and allow the machine to cool again, I do not recover the FPS. This makes me think it's not a temperature issue.
I don't know if I actually did, but I thought I'd written a small program utilising DRM/KMS
to check whether there was slow down in that and from what I recall there wasn't any but my memory is hazy.
Todo: redo this and check
I want to fix this before adding anything else. If I can get a baseline of a compositor running at 60 FPS then I know I can add bells and whistles after that.
I noticed that as
weston-simple-egl
runs our frame rate slowly drops from just below 60 FPS towards 30 FPS.I'm not sure whether this is happening because I'm running
weston-simple-egl
or would happen slowly regardless.Theories as to why this might be: