[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] vim slow
On 30/09/14 10:49, Vincent Rivière wrote:
> On 30/09/2014 10:15, Alan Hourihane wrote:
>> That's why the system call modifies 0 to become 1. And that's also why I
>> say when it is 0, to return without the timeout.
>
> I don't fully understand the parameters. I will have to carefully read
> the documentation of poll() and select().
>
> Anyway, when the user program (such as vim) asks:
> "Is there any character present on stdin? No wait, please."
> and there is no pending character,
> then Fpoll() should return immediately and quickly.
>
> The problem is very visible in vim, I wonder which other programs
> could be affected by similar slowness...
> It would be a great surprise if the future fix could boost the whole
> kernel.
>
Does this patch fix things for you Vincent ?
Alan.
Index: sys/dosfile.c
===================================================================
RCS file: /mint/freemint/sys/dosfile.c,v
retrieving revision 1.42
diff -u -r1.42 dosfile.c
--- sys/dosfile.c 7 Mar 2014 09:04:59 -0000 1.42
+++ sys/dosfile.c 30 Sep 2014 09:59:24 -0000
@@ -1258,7 +1258,7 @@
if (timeout == ~0)
timeout = 0;
else if (timeout == 0)
- timeout = 1;
+ goto cancel;
if (count == 0)
{