On Fri, 27 Mar 2009 22:53:00 +0100 Jakob Bornecrantz <wallbra...@gmail.com> wrote:
> On Fri, Mar 27, 2009 at 8:58 PM, Jesse Barnes > <jbar...@virtuousgeek.org> wrote: > > This patch speeds up drmModeGetConnector by pre-allocating mode & > > property info space before calling into the kernel. In many cases > > this pre-allocation will be sufficient to hold the returned values > > (it's easy enough to tweak if the common case becomes larger), > > which means we don't have to make the second call, which saves a > > lot of time. > > > > Any comments or problems with the patch? > > Looks good, I do wonder how much time do we save on doing pre > allocation, just curious? Anyways the patch is > Acked-by: Jakob Bornecrantz <wallbra...@gmail.com> > > Cheers Jakob. Some of my testing showed it took about .3s for a drmModeGetConnector call and my testing showed this decrease a lot with the pre-allocation (conveniently lost the test results though). Theoretically it should be about half the cost with pre-allocation, which adds up if you multiply by the number of outputs. -- Jesse Barnes, Intel Open Source Technology Center ------------------------------------------------------------------------------ -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel