[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fkt-devel] performance issues in fxt
From: |
François Trahay |
Subject: |
Re: [Fkt-devel] performance issues in fxt |
Date: |
Fri, 26 Aug 2011 09:39:30 +0200 |
User-agent: |
KMail/1.13.7 (Linux/3.0.0-1-amd64; KDE/4.6.5; x86_64; ; ) |
On Friday 26 August 2011 00:22:17 Samuel Thibault wrote:
> François Trahay, le Thu 25 Aug 2011 17:40:45 +0200, a écrit :
> > On Thursday 25 August 2011 17:23:23 Samuel Thibault wrote:
> > > François Trahay, le Thu 25 Aug 2011 17:19:53 +0200, a écrit :
> > > > Actually fxt_next_ev calls 'read' several times, leading to a large
> > > > overhead. I managed to modify it so it reads 4KB blocks (reducing the
> > > > number of calls to read and thus the total overhead) and the
> > > > performance increases a lot: each call to fxt_next_ev now cost
> > > > approx 200ns.
> > >
> > > Mmm, shouldn't we be able to simply use fread & co instead of read &
> > > co?
> >
> > Well, we could reduce the number of calls to read to 2,
>
> Err, I don't see the relation with my comment.
>
> My comment simply means: instead of reinventing buffering, why not just
> using the one implemented by fread?
>
> Samuel
hmm... Good point.
The problem with fread&co in fxt is that it changes a lot of things and it
would break the API (fxt_fdopen wouldn't be available anymore).
I can give a try and see the performance.
François