Skip to content

dix: cache ResourceClientBits() value

Olivier Fourdan requested to merge ofourdan/xserver:ilog2-optimize into master

The LimitClient is set once and for all at startup, whereas the function ResourceClientBits() which returns the client field offset within the XID based on the value of LimitClient can be called repeatedly.

Small optimization, cache the result of ilog2(), that saves running the same loop over and over each time ResourceClientBits() is called.

Signed-off-by: Olivier Fourdan

Merge request reports