This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setup


On Jun  8 22:54, Achim Gratz wrote:
> Corinna Vinschen writes:
> > I'm certainly not de-valuing your patch, but that makes me suspicious.
> > The impact of reading from a local SSD should be rather low.  That
> > reminds me of the buffer size problem slowing down SHA512 evaluation,
> > see git diff 0c7564..8648b05.
> >[...]
> > YY_INPUT	   8K
> >
> > Especially YY_READ_BUF_SIZE defined as 8K might be a culprit here.
> 
> At least from the network the slow part is the loading of the file
> (while the progress bar updates).  Parsing should happen in that split
> second when the loading is complete and before it switches to the
> chooser pane.

Right, in the networking case the download should be the major factor,
but I was referring to the SSD case.

> > Can you speed up reading the ini file noticably by defining
> > YY_READ_BUF_SIZE to 65536 in inilex.ll?  If so, is the impact of using
> > base64 still an issue, performance-wise?
> 
> That's not the right place to do the override, since it ends up after
> the default definition.

Huh?  Not for me:

diff --git a/inilex.ll b/inilex.ll
index 81a7f24..b5ea619 100644
--- a/inilex.ll
+++ b/inilex.ll
@@ -29,6 +29,7 @@
 #include "sha2.h"
 
 #define YY_INPUT(buf,result,max_size) { result = ini_getchar(buf, max_size); }
+#define YY_READ_BUF_SIZE 65536
 
 static int ini_getchar(char *buf, int max_size);
 static void ignore_line (void);

> In any case, from the Flex manual it doesn't
> make sense to increase that buffer ("it's almost always too large") and
> it is being fed from an io_stream, which is buffered itself.

Yes, but it's using the default buffersize of the underlying MSVCRT
stdio, which is using some value I don't know off the top of my head.
Typically this would be 1K or 4K.  YY_INPUT is reading in 8K chunks, so
the underlying stdio is very likely already skipping its buffering.
So changing YY_READ_BUF_SIZE to 64K *should* have an impact.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpjgcLTKH4IK.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]