[Xfce4-commits] <thunar:master> Reduce D-Bus noise by grouping thumbnail requests in 100ms time slots.

Stephan Arts stephan at xfce.org
Fri Sep 4 10:36:34 CEST 2009


On Fri, Sep 4, 2009 at 3:22 AM, Jannis Pohlmann<jannis at xfce.org> wrote:
> Updating branch refs/heads/master
>         to 4911ff1ed0f3fe2d7299a35cb72f0d6dcffcac79 (commit)
>       from e99cdb4cfae6392f15dc677c3e1c3b0e892a789a (commit)
>
> commit 4911ff1ed0f3fe2d7299a35cb72f0d6dcffcac79
> Author: Jannis Pohlmann <jannis at xfce.org>
> Date:   Fri Sep 4 03:11:05 2009 +0200
>
>    Reduce D-Bus noise by grouping thumbnail requests in 100ms time slots.
>
>    Just like the rest of ThunarThumbnailer, this code is somewhat scary.
>    ThunarThumbnailer now queues individual thumbnail request in a wait
>    queue which is triggered at most every 100ms. All requests made in this
>    time slot are grouped and sent out as *one* request.
>
>    For each time slot, the local optimization is 3+n D-Bus messages (1
>    request, 1 started signal, 1 finished signal and n ready signals) as
>    compared to 4*n messages we had before (1 request and 1 started,
>    finished and ready signal for each individual file).
>
>    Of course this calculation is naive. In theory our users scroll up and
>    down like crazy, sometimes slower, sometimes faster, everyeone using
>    different Thunar window and icon sizes.
>
>    As a result the grouped requests are sometimes very small and sometimes
>    very large. It's worth noting that this optimization performs better,
>    the more files are visible in the window and the faster a user scrolls
>    (as this means that more files are made visible within 100ms and thus,
>    the size of group requests grows). So I guess we're good.

Jannis, that's a beautiful solution :-)

-
Stephan



More information about the Xfce4-dev mailing list