changeset 5779:e9d0228c5671

Use a larger buffering size in #'copy-file too. src/ChangeLog addition: 2014-01-16 Aidan Kehoe <kehoea@parhasard.net> * fileio.c (READ_BUF_SIZE): [...] Use it in #'copy-file too, move its #define earlier to make that possible. Not relevant to the coding system buffering, but still helpful.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 16 Jan 2014 21:03:03 +0000
parents 319e18d08654
children 580ebed3500a
files src/ChangeLog src/fileio.c
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Jan 16 20:26:27 2014 +0000
+++ b/src/ChangeLog	Thu Jan 16 21:03:03 2014 +0000
@@ -6,6 +6,10 @@
 	of #x10000, and that size works better with the coding system
 	buffering, improving performance there; move to this value.
 
+	Use it in #'copy-file too, move its #define earlier to make that
+	possible. Not relevant to the coding system buffering, but still
+	helpful.
+
 2014-01-16  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* file-coding.c:
--- a/src/fileio.c	Thu Jan 16 20:26:27 2014 +0000
+++ b/src/fileio.c	Thu Jan 16 21:03:03 2014 +0000
@@ -1785,6 +1785,8 @@
     }
   return;
 }
+
+#define READ_BUF_SIZE (2 << 16)
 
 DEFUN ("copy-file", Fcopy_file, 2, 4,
        "fCopy file: \nFCopy %s to file: \np\nP", /*
@@ -1801,7 +1803,7 @@
 {
   /* This function can call Lisp.  GC checked 2000-07-28 ben */
   int ifd, ofd, n;
-  Rawbyte buf[16 * 1024];
+  Rawbyte buf[READ_BUF_SIZE];
   struct stat st, out_st;
   Lisp_Object handler;
   int speccount = specpdl_depth ();
@@ -2870,8 +2872,6 @@
 }
 
 
-#define READ_BUF_SIZE (2 << 16)
-
 DEFUN ("insert-file-contents-internal", Finsert_file_contents_internal,
        1, 7, 0, /*
 Insert contents of file FILENAME after point; no coding-system frobbing.