APPROVE COMMIT
NOTE: This patch has been committed.
This will also improve performance for large VM buffers, and I wouldn’t be
surprised if it gave the largest improvement of the changes I’ve made. It
does this by reducing the calls to Lstream_read(), and by matching the
buffer size to the coding buffer size, so there’s less (though not no) need
for adjustment of the character_tell() result due to the the two getting out
of sync.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1389903987 0
# Node ID 319e18d08654e2b6b6a20bc496349fcc959ed69f
# Parent ccaa851ae712e870ceb65d19226426d40d8de48c
Increase READ_BUF_SIZE, used in #'insert-file-contents-internal, to #x10000
src/ChangeLog addition:
2014-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
* fileio.c (READ_BUF_SIZE):
Stack sizes > 2**16 elicited bugs back in August 1996, but there's
nothing to indicate this is still the case. GNU uses a block size
of #x10000, and that size works better with the coding system
buffering, improving performance there; move to this value.
diff -r ccaa851ae712 -r 319e18d08654 src/ChangeLog
--- a/src/ChangeLog Thu Jan 16 19:56:06 2014 +0000
+++ b/src/ChangeLog Thu Jan 16 20:26:27 2014 +0000
@@ -1,3 +1,11 @@
+2014-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * fileio.c (READ_BUF_SIZE):
+ Stack sizes > 2**16 elicited bugs back in August 1996, but there's
+ nothing to indicate this is still the case. GNU uses a block size
+ of #x10000, and that size works better with the coding system
+ buffering, improving performance there; move to this value.
+
2014-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
* file-coding.c:
diff -r ccaa851ae712 -r 319e18d08654 src/fileio.c
--- a/src/fileio.c Thu Jan 16 19:56:06 2014 +0000
+++ b/src/fileio.c Thu Jan 16 20:26:27 2014 +0000
@@ -2870,9 +2870,7 @@
}
-/* Stack sizes > 2**16 is a good way to elicit compiler bugs */
-/* #define READ_BUF_SIZE (2 << 16) */
-#define READ_BUF_SIZE (1 << 15)
+#define READ_BUF_SIZE (2 << 16)
DEFUN ("insert-file-contents-internal", Finsert_file_contents_internal,
1, 7, 0, /*
--
‘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