Hello! Thank you Laurent for this work of code art
It is a truly beautiful library.
A small performance issue that has recently bitten me (and is basically the only SFML issue to ever have done so!) : text rendering suffers major performance issues on Linux due to the implementation of Window::getSize. Window does not cache it's own size, so it needs to go to the OS every time getSize is called, and it is called during text rendering. On Windows apparently this is no problem, (I have never had an issue with it) I guess GetClientRect is fast. On Linux, at least the flavor I am running, I see a large performance impact when large amounts of text is being drawn. XGetWindowAttributes appears to not be anywhere near as snappy as GetClientRect. The majority of the time when I halt my app in gdb, I am seeing that it is waiting on the XGetWindowAttributes syscall to respond.
It is easily fixed via a thin caching layer. If I understand the architecture correctly, we can store the window size once at creation, and then update it via the resize message. Then we can return cached size in the call to getSize. This minor change solved the problem for me, and it made the difference between my game running at 70 mspf without the opt, down to 16 mspf with it. With this change my Linux port is as responsive as Windows
I'm sure you don't want to muddy your architecture with caching, but we really need to in this case - I don't think it's necessary to go to a syscall in what would seem to a client to be a thin getter. And, as I said, it is a serious performance concern, at least for Linux.
Thanks again for your excellent work!