APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1389906183 0
# Node ID e9d0228c56716b3b9468a1ee64b35722abde5cab
# Parent 319e18d08654e2b6b6a20bc496349fcc959ed69f
Use a larger buffering size in #'copy-file too.
src/ChangeLog addition:
2014-01-16 Aidan Kehoe <kehoea(a)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.
diff -r 319e18d08654 -r e9d0228c5671 src/ChangeLog
--- 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(a)parhasard.net>
* file-coding.c:
diff -r 319e18d08654 -r e9d0228c5671 src/fileio.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.
--
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches