search for: setvbuf

Displaying 20 results from an estimated 74 matches for "setvbuf".

2015 Dec 10
5
Windows file buffering
...http://git.xiph.org/?p=flac.git;a=commitdiff;h=e8632477774f56b4fe7ccab525cad2ceab244b8a> the current code: #ifdef _WIN32 /* * Windows can suffer quite badly from disk fragmentation. This can be * reduced significantly by setting the output buffer size to be 10MB. */ setvbuf(file, NULL, _IOFBF, 10*1024*1024); #endif LRN <lrn1986 at gmail.com> wrote: > The commit mentioned in the feature request should not cause such > behaviour, as it only does short-lived operations (opens a file, does > stuff, closes the file immediately after) and is clearly distin...
2001 Oct 27
1
setlinebuf vs. setvbuf: Caldera OpenUNIX8.
On Fri, 26 Oct 2001, Larry Rosenman wrote: :I tried to compile OpenSSH 2.9.9p2 on my Caldera OpenUNIX8 system and :it couldn't find setlinebuf. setlinebuf is a BSD compatibility :function. It was called from sftp-int.c. Looking at the code, there :is a #ifdef for HAVE_SETVBUF, but apparently configure isn't set to :look for setvbuf (which we DO have). : :I added a #define HAVE_SETVBUF 1 to config.h, and this problem goes :away. configure does check for setvbuf, so i don't know what i wrong. i wonder if the #ifdefs can be removed? what systems do not have setv...
2001 May 22
1
[PATCH]: configure.in: Missing check for setvbuf
Hi, in configure.in the patch for `setvbuf' is missing while in sftp-int.c the HAVE_SETVBUF define is used: Index: configure.in =================================================================== RCS file: /cvs/openssh_cvs/configure.in,v retrieving revision 1.286 diff -u -p -r1.286 configure.in --- configure.in 2001/05/17 03:32:51 1.28...
2014 Sep 26
2
Disk fragmentation
...es with no FPU are usually embedded, and > embedded developers change some code anyway. Maybe it's a good > idea to just mention this in the README, under the "Note to > embedded developers", as something that can be removed without > problem? IMHO it's better to move setvbuf() out of libFLAC/stream_encoder.c into flac/encode.c. I can see two ways to do this: 1) Add a new function to libFLAC API that have access to encoder->private_->file and can call setvbuf: FLAC_API FLAC__bool FLAC__stream_encoder_set_buffer_size(FLAC__StreamEncoder *encoder, unsigned size);...
2015 Dec 10
0
Windows file buffering
...74f56b4fe7ccab525cad2ceab244b8a> > > > the current code: > > #ifdef _WIN32 > /* > * Windows can suffer quite badly from disk fragmentation. This > can be > * reduced significantly by setting the output buffer size to be > 10MB. > */ > setvbuf(file, NULL, _IOFBF, 10*1024*1024); > #endif > > > LRN <lrn1986 at gmail.com> wrote: > >> The commit mentioned in the feature request should not cause such >> behaviour, as it only does short-lived operations (opens a file, does >> stuff, closes the file immedi...
2014 Sep 26
3
Patch to add buffering to decoding too
Can you please wrap the setvbuf in _WIN32 IFDEFs too? Currently memory usage of FLAC decoding is about 1MB, so this patch is increasing memory usage tenfold, also for platforms that do not need this. It is a non-problem on my system anyway. Op 26-09-14 om 10:36 schreef Janne Hyv?rinen: > I made some changes to the previous...
2014 Sep 24
2
Disk fragmentation
Miroslav Lichvar wrote: > Hm, does this mean that every process encoding FLAC files will now > need extra 10MB of memory? Is that ok for small devices with limited > memory? What small device do you have in mind? The smallest device I could possibly imagine *encoding* FLAC on is Rasberry Pi which has 512Meg of RAM. If you really are concerned about this (and knowing that it has little
2014 Sep 27
0
Disk fragmentation
lvqcl wrote: > IMHO it's better to move setvbuf() out of libFLAC/stream_encoder.c > into flac/encode.c. Why do you thing that is better? > I can see two ways to do this: > > 1) Add a new function to libFLAC API that have access to > encoder->private_->file and can call setvbuf: > > FLAC_API FLAC__bool FLAC__stream_...
2015 Dec 10
0
Windows file buffering
...unlikely to be the cause. > > Maybe you mean some other commit? For example, > <http://git.xiph.org/?p=flac.git;a=commitdiff;h=d66f6754bf94bc8ba23d3579d0b5650cd380c9f0> ? Yes, that is exactly what i meant. > > The attached patch *should* resolve the issue. libFLAC will call setvbuf(file, ...) > only if GetFileType(...file...) == FILE_TYPE_DISK. That patch looks correct. That said, i'm not sure why there's setvbuf() in the first place. I mean, the code to de-fragment the output file already exists (the aforementioned d66f675), so why buffering? Was it proven empiri...
2000 Mar 16
0
Compilation and solving problem on mips-sony-bsd.
..., having trouble with compilation. Also I have question and want be helped to solve the problem. Yes, I can compile it with dirty hack which is found at ftp://ftp.tutrp.tut.ac.jp/pub/sony-news/samba/samba-news4.diff There are some problems about this old and specific system. 1. It does not have setvbuf(). 2. It does not have 'struct utimbuf'. 3. It has 'O_NONBLOCK' in <stream/xti.h>. 4. It does not have 'WNOHANG'. I don't know why. The setvbuf() can be replaced with setbuffer() and setlinebuf(), for example, I wrote --->8------>8------>8------>8---...
2015 Dec 10
2
Windows file buffering
lvqcl, Would you be able to have alook at this one? I think its Windows related: https://sourceforge.net/p/flac/feature-requests/114/ Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
2014 Sep 23
4
Disk fragmentation
...y bits of data to disk at once. A fragmentation analyzing tool reported that my files were in 300 fragments on average. Thanks to this decoding the files happened in a fraction of the speed that I should be getting. There would be one very simple solution to help against this issue, the use of setvbuf() command to buffer the file writes to larger chunks. Unfortunately it looks like the call has to be done inside libflac. The simple test change shown at the end of the mail reduced average fragmentation to two fragments per file and decode speeds were as good as without fragmentation. I don...
2014 Sep 25
2
Patch to add buffering to decoding too
.../flac/decode.c b/src/flac/decode.c index 5e5e17a..9e9405c 100644 --- a/src/flac/decode.c +++ b/src/flac/decode.c @@ -251,6 +251,7 @@ FLAC__bool DecoderSession_construct(DecoderSession *d, FLAC__bool is_ogg, FLAC__ DecoderSession_destroy(d, /*error_occurred=*/true); return false; } + setvbuf(d->fout, NULL, _IOFBF, 10*1024*1024); /* 10MB output buffer to help reduce disk fragmentation */ } }
2020 Mar 27
2
[Bug 14328] New: usleep() is obsolete, use nanosleep()
...obsolete; use nanosleep(2) instead. POSIX.1-2008 removes the specification of usleep(). recent rsync 3.1.3 is still using usleep: # grep -r usleep * config.h.in:/* Define to 1 if you have the `usleep' function. */ configure.ac: initgroups utimensat posix_fallocate attropen setvbuf usleep) configure.sh: initgroups utimensat posix_fallocate attropen setvbuf usleep OLDNEWS: - Use usleep() for our msleep() function if it is available. util2.c: usleep(t*1000); for my curiosity, that went into rsync @2014, which is not too long ago: https://git.samba.org/rsync.git/?p=...
2001 Sep 29
0
configure.in fixes for 2.9.9p2
...nfo getgrouplist getopt getnameinfo getrlimit getrusage getttyent glob inet_aton inet_ntoa inet_ntop innetgr login_getcapbool md5_crypt memmove mkdtemp on_exit openpty readpassphrase realpath rresvport_af setdtablesize setenv setegid seteuid setlogin setproctitle setresgid setreuid setrlimit setsid setvbuf sigaction sigvec snprintf strerror strlcat strlcpy strmode strsep sysconf tcgetpgrp utimes vsnprintf vhangup waitpid _getpty __b64_ntop) +AC_CHECK_FUNCS(arc4random atexit b64_ntop bcopy bindresvport_sa clock fchown fchmod freeaddrinfo futimes gai_strerror getcwd getaddrinfo getgrouplist getopt getn...
2002 Sep 11
1
Suggest Rsync Performance Improvements
1. Large 1 MB I/O, all reads and write to file systems 1MB (can use setvbuf to do this with out coding) e.g a awk programme doing 8K I/O to read 2GB file took 16 min, a perl programme doing 1MB I/O took 16 seconds. 2. When doing rsync -a /dir1/dir2 /dir3/dir4 Do not use pipe's, as they only read/write 5k at a time this is extremly slow, check it out with Solaris...
2012 Sep 19
1
[PATCH 1/1] lua: Enabling io.read() in Lua.c32 with some restrictions
...rc/liolib.c +++ b/com32/lua/src/liolib.c @@ -18,12 +18,18 @@ #include "lauxlib.h" #include "lualib.h" - +#ifdef SYSLINUX + #define NO_TMP_FILE 1 + #define NO_READ_NUMBER 1 + #define NO_TEST_EOF 1 + #define NO_CLEAR_ERR 1 + #define NO_F_SEEK 1 + #define NO_F_SETVBUF 1 +#endif #define IO_INPUT 1 #define IO_OUTPUT 2 - static const char *const fnames[] = {"input", "output"}; @@ -180,7 +186,7 @@ static int io_popen (lua_State *L) { } -#ifndef SYSLINUX +#ifndef NO_TMP_FILE static int io_tmpfile (lua_State *L) { FILE **...
2013 May 05
2
Bug fix and compatibility patches for 1.3.0pre4
...brary/70hdhh4t%28v=vs.80%29.aspx), so I don't think it's a good idea to use it this way even if tests suggested it works. I'll write a test program tomorrow to try the fflush+_lseeki64 approach. Another solution - although a bit ugly - might be to disable buffering on Windows using setvbuf.
2014 Sep 26
1
Patch to add buffering to decoding too
...not suffering from fragmentation curious. I just tested decoding a flac in Fedora 20 and filefrag command reports the decoded file is in 8 extents. Different name but same thing. On 26.9.2014 14:08, Erik de Castro Lopo wrote: > Martijn van Beurden wrote: > >> Can you please wrap the setvbuf in _WIN32 IFDEFs too? Currently >> memory usage of FLAC decoding is about 1MB, so this patch is >> increasing memory usage tenfold, also for platforms that do not >> need this. It is a non-problem on my system anyway. > +1 > > Will apply patch when it (and the previous on...
2002 Oct 25
0
NeXT Community
...memmove \ - mkdtemp mmap ngetaddrinfo openpty ogetaddrinfo readpassphrase \ + mkdtemp ngetaddrinfo openpty ogetaddrinfo readpassphrase \ realpath recvmsg rresvport_af sendmsg setdtablesize setegid \ setenv seteuid setgroups setlogin setproctitle setresgid setreuid \ setrlimit setsid setpcred setvbuf sigaction sigvec snprintf \ socketpair strerror strlcat strlcpy strmode sysconf tcgetpgrp \ truncate utimes vhangup vsnprintf waitpid __b64_ntop _getpty) + +dnl Make sure that mmap prototype is defined before defining HAVE_MMAP +AC_CHECK_DECL(mmap, [AC_CHECK_FUNCS(mmap)]) dnl Make sure strsep...