This gives a dramatic improvement in memory usage for me, with at least one
107 MB log file constantly being written to.
xemacs-packages/erc/ChangeLog addition:
2009-07-22 Aidan Kehoe <kehoea(a)parhasard.net>
* erc-log.el (erc-log-setup-logging):
Don't insert the entire log file into the buffer if
erc-truncate-buffer is in erc-insert-post-hook (even though most
of the buffer is later deleted in this case); avoids XEmacs
keeping lots of memory around needlessly when log files are huge
but buffer sizes are tiny. GNU Emacs doesn't do this, but it
should be a win there too, there's no need to create a 100 MB
buffer needlessly.
XEmacs Packages (existing ChangeLogs) source patch:
Diff command: cvs -q diff -Nu
Files affected: xemacs-packages/erc/erc-log.el
Index: xemacs-packages/erc/erc-log.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/erc/erc-log.el,v
retrieving revision 1.10
diff -u -r1.10 erc-log.el
--- xemacs-packages/erc/erc-log.el 2008/07/23 07:23:12 1.10
+++ xemacs-packages/erc/erc-log.el 2009/07/22 10:39:43
@@ -230,9 +230,17 @@
(set (make-local-variable 'write-file-hooks)
'(erc-save-buffer-in-logs))))
(when erc-log-insert-log-on-open
- (ignore-errors (insert-file-contents (erc-current-logfile))
- (move-marker erc-last-saved-position
- (1- (point-max)))))))
+ (let* ((log-file (erc-current-logfile))
+ (log-file-size (nth 7 (file-attributes log-file)))
+ (start (if (and log-file-size
+ (memq 'erc-truncate-buffer
+ erc-insert-post-hook))
+ (- log-file-size erc-max-buffer-size)
+ 0)))
+ (ignore-errors (insert-file-contents log-file nil start
+ log-file-size))
+ (move-marker erc-last-saved-position
+ (1- (point-max)))))))
;;; Append, so that 'erc-initialize-log-marker keeps running first.
(add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append)
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Hi,
ede occurs twice in xemacs-packages/Makefile causing some warnings
like this:
----------------------------------------------------------------------
[ -d xemacs-packages ] && make -C xemacs-packages autoloads
make[1]: Entering directory `/home/matsl/work/smoketest/build/packages/xemacs-packages'
../iterate.rules:38: target `ede/autoloads.target' given more than once in the same rule.
../iterate.rules:38: target `ede/bytecompile.target' given more than once in the same rule.
../iterate.rules:38: target `ede/clean.target' given more than once in the same rule.
../iterate.rules:38: target `ede/distclean.target' given more than once in the same rule.
[...]
----------------------------------------------------------------------
This patch avoids this.
Index: xemacs-packages/Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/Makefile,v
retrieving revision 1.44
diff -u -r1.44 Makefile
--- xemacs-packages/Makefile 26 Jul 2009 15:06:16 -0000 1.44
+++ xemacs-packages/Makefile 30 Jul 2009 21:26:46 -0000
@@ -41,7 +41,7 @@
apel cc-mode debug dired ecrypto edit-utils elib eterm ispell \
os-utils sh-script texinfo text-modes xlib \
\
- ede edebug efs net-utils xemacs-devel \
+ edebug efs net-utils xemacs-devel \
\
cedet-common speedbar eieio ede semantic cogre \
\
Yours
--
%% Mats
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
APPROVE COMMIT 21.5
changeset: 4667:cbe5d2169270
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Tue Jul 28 23:23:47 2009 +0900
summary: Fix typos in face.c.
diff -r 4c1a8323aa9a -r cbe5d2169270 src/ChangeLog
--- a/src/ChangeLog Tue Jul 28 23:19:27 2009 +0900
+++ b/src/ChangeLog Tue Jul 28 23:23:47 2009 +0900
@@ -1,3 +1,10 @@
+2009-07-28 Stephen Turnbull <stephen(a)xemacs.org>
+
+ * faces.c (ensure_face_cachel_contains_charset):
+ (add_face_cachel):
+ (update_face_cachel_data):
+ Fix typos in comments and otherwise improve them.
+
2009-07-27 Stephen J. Turnbull <stephen(a)xemacs.org>
* eval.c (debug-on-error): Document interaction with process filters.
diff -r 4c1a8323aa9a -r cbe5d2169270 src/faces.c
--- a/src/faces.c Tue Jul 28 23:19:27 2009 +0900
+++ b/src/faces.c Tue Jul 28 23:23:47 2009 +0900
@@ -1171,7 +1171,11 @@
/* Lookup the face again, this time allowing the fallback. If this
succeeds, it'll give a font intended for the script in question,
which is preferable to translating to ISO10646-1 and using the
- fixed-width fallback. */
+ fixed-width fallback.
+
+ #### This is questionable. The problem is that unusual scripts
+ will typically fallback to the hard-coded values as the user is
+ unlikely to have specified them herself, a common complaint. */
new_val = face_property_matching_instance (face, Qfont,
charset, domain,
ERROR_ME_DEBUG_WARN, 0,
@@ -1353,7 +1357,7 @@
Dynarr_add (w->face_cachels, new_cachel);
/* The face's background pixmap have not yet been frobbed (see comment
- int update_face_cachel_data), so we have to do it now */
+ in update_face_cachel_data), so we have to do it now */
if (must_finish_frobbing)
{
int default_face = EQ (face, Vdefault_face);
@@ -1394,7 +1398,7 @@
which in turn might require that the cache we're building be up to
date, hence a crash. Here's a typical scenario of this:
- - a new window is created and it's face cache elements are
+ - a new window is created and its face cache elements are
initialized through a call to reset_face_cachels[1]. At that point,
the cache for the default and modeline faces (normaly taken care of
by redisplay itself) are null.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
APPROVE COMMIT 21.5
changeset: 4667:cbe5d2169270
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Tue Jul 28 23:23:47 2009 +0900
summary: Fix typos in face.c.
diff -r 4c1a8323aa9a -r cbe5d2169270 src/ChangeLog
--- a/src/ChangeLog Tue Jul 28 23:19:27 2009 +0900
+++ b/src/ChangeLog Tue Jul 28 23:23:47 2009 +0900
@@ -1,3 +1,10 @@
+2009-07-28 Stephen Turnbull <stephen(a)xemacs.org>
+
+ * faces.c (ensure_face_cachel_contains_charset):
+ (add_face_cachel):
+ (update_face_cachel_data):
+ Fix typos in comments and otherwise improve them.
+
2009-07-27 Stephen J. Turnbull <stephen(a)xemacs.org>
* eval.c (debug-on-error): Document interaction with process filters.
diff -r 4c1a8323aa9a -r cbe5d2169270 src/faces.c
--- a/src/faces.c Tue Jul 28 23:19:27 2009 +0900
+++ b/src/faces.c Tue Jul 28 23:23:47 2009 +0900
@@ -1171,7 +1171,11 @@
/* Lookup the face again, this time allowing the fallback. If this
succeeds, it'll give a font intended for the script in question,
which is preferable to translating to ISO10646-1 and using the
- fixed-width fallback. */
+ fixed-width fallback.
+
+ #### This is questionable. The problem is that unusual scripts
+ will typically fallback to the hard-coded values as the user is
+ unlikely to have specified them herself, a common complaint. */
new_val = face_property_matching_instance (face, Qfont,
charset, domain,
ERROR_ME_DEBUG_WARN, 0,
@@ -1353,7 +1357,7 @@
Dynarr_add (w->face_cachels, new_cachel);
/* The face's background pixmap have not yet been frobbed (see comment
- int update_face_cachel_data), so we have to do it now */
+ in update_face_cachel_data), so we have to do it now */
if (must_finish_frobbing)
{
int default_face = EQ (face, Vdefault_face);
@@ -1394,7 +1398,7 @@
which in turn might require that the cache we're building be up to
date, hence a crash. Here's a typical scenario of this:
- - a new window is created and it's face cache elements are
+ - a new window is created and its face cache elements are
initialized through a call to reset_face_cachels[1]. At that point,
the cache for the default and modeline faces (normaly taken care of
by redisplay itself) are null.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
APPROVE COMMIT 21.5
diff -r df8967cf6726 man/ChangeLog
--- a/man/ChangeLog Wed Jul 08 10:15:34 2009 +0900
+++ b/man/ChangeLog Sun Jul 12 23:23:29 2009 +0900
@@ -1,3 +1,9 @@
+2009-07-08 Stephen Turnbull <stephen(a)xemacs.org>
+
+ * xemacs/custom.texi (Xft Font Customization): Change references
+ from XftFont (now deprecated) to FcFontName.
+ Thanks, Raymond Toy <raymond.toy(a)stericsson.com>.
+
2009-05-18 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.29 "garbanzo" is released.
diff -r df8967cf6726 man/xemacs/custom.texi
--- a/man/xemacs/custom.texi Wed Jul 08 10:15:34 2009 +0900
+++ b/man/xemacs/custom.texi Sun Jul 12 23:23:29 2009 +0900
@@ -2566,16 +2566,19 @@
Here are the resources I use. @strong{Warning:} @emph{This interface
will change. Pay attention to beta announcements, and complain loudly
if changes aren't documented here!} The tab control and menubar have
-separate Font and XftFont resources, and use the X resource manager to
-instantiate a FontStruct from the Font resource. There is no converter
-facility for XftFont yet, and creating one that handles both FontStruct
-and XftFont depending on XEmacs's configuration and the font name seems
-error-prone at best. Probably we will use a simple string
-representation for this resource, and convert to a face in XEmacs rather
-than a font in Xt/Xft.
+separate @code{Font} and @code{FcFontName} resources, and use the X
+resource manager to instantiate a FontStruct from the @code{Font}
+resource. There is no converter facility for @code{FcFontName} yet, and
+creating one that handles both FontStruct and XftFont depending on
+XEmacs's configuration and the font name seems error-prone at best.
+Probably we will use a simple string representation for this resource,
+and convert to a face in XEmacs rather than a font in Xt/Xft. (The
+older @code{XftFont} resource is deprecated. There is code intended to
+implement backward compatibility, but there are repots that it doesn't
+work properly.)
@example
-XEmacs*Tabs.xftFont: Bitstream Vera Sans-16
-XEmacs*menubar*xftFont: Bitstream Vera Sans-16
+XEmacs*Tabs.fcFontName: Bitstream Vera Sans-16
+XEmacs*menubar*fcFontName: Bitstream Vera Sans-16
XEmacs.modeline.attributeFont: Bitstream Charter-16
XEmacs.default.attributeFont: Bitstream Vera Sans Mono-16
@end example
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
APPROVE COMMIT 21.5
changeset: 4665:f3a65dff1912
parent: 4659:e73b6e513092
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Tue Jul 28 22:57:59 2009 +0900
summary: Fix UNUSED and USED_IF parsing in make-docfile.c.
diff -r e73b6e513092 -r f3a65dff1912 lib-src/ChangeLog
--- a/lib-src/ChangeLog Mon Jul 27 01:46:33 2009 +0900
+++ b/lib-src/ChangeLog Tue Jul 28 22:57:59 2009 +0900
@@ -1,3 +1,7 @@
+2009-07-28 Stephen Turnbull <stephen(a)xemacs.org>
+
+ * make-docfile.c (write_c_args): Parse UNUSED and USED_IF right.
+
2009-05-18 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.29 "garbanzo" is released.
diff -r e73b6e513092 -r f3a65dff1912 lib-src/make-docfile.c
--- a/lib-src/make-docfile.c Mon Jul 27 01:46:33 2009 +0900
+++ b/lib-src/make-docfile.c Tue Jul 28 22:57:59 2009 +0900
@@ -533,6 +533,8 @@
/* Write to file OUT the argument names of function FUNC, whose text is in BUF.
MINARGS and MAXARGS are the minimum and maximum number of arguments. */
+#define SKIPWHITE do { while (isspace ((unsigned char) (*p))) p++; } while (0)
+
static void
write_c_args (FILE *out, const char *UNUSED (func), char *buf,
int minargs, int maxargs)
@@ -540,6 +542,7 @@
register char *p;
int in_ident = 0;
int just_spaced = 0;
+ int need_paren = 0;
#if 0
int need_space = 1;
@@ -560,76 +563,68 @@
for (p = buf; *p; p++)
{
char c = *p;
+#if 0
int ident_start = 0;
+#endif
- /* XEmacs addition: add support for ANSI prototypes and the UNUSED
- macros. Hop over them. "Lisp_Object" is the only C type allowed
- in DEFUNs. For the UNUSED macros we need to eat parens, too. */
+ /* XEmacs addition: used for ANSI prototypes and UNUSED macros. */
static char uu [] = "UNUSED";
static char ui [] = "USED_IF_";
- static char lo[] = "Lisp_Object";
+ static char lo [] = "Lisp_Object";
- /* aren't these all vulnerable to buffer overrun? I guess that
- means that the .c is busted, so we may as well just die ... */
- /* skip over "Lisp_Object" */
- if ((C_IDENTIFIER_CHAR_P (c) != in_ident) && !in_ident &&
- (strncmp (p, lo, sizeof (lo) - 1) == 0) &&
- isspace ((unsigned char) p[sizeof (lo) - 1]))
- {
- p += (sizeof (lo) - 1);
- while (isspace ((unsigned char) (*p)))
- p++;
- c = *p;
- }
-
- /* skip over "UNUSED" invocation */
- if ((C_IDENTIFIER_CHAR_P (c) != in_ident) && !in_ident &&
- (strncmp (p, uu, sizeof (uu) - 1) == 0))
- {
- char *here = p;
- p += (sizeof (uu) - 1);
- while (isspace ((unsigned char) (*p)))
- p++;
- if (*p == '(')
- {
- while (isspace ((unsigned char) (*++p)))
- ;
- c = *p;
- }
- else
- p = here;
- }
-
- /* skip over "USED_IF_*" invocation (only if USED failed) */
- else if ((C_IDENTIFIER_CHAR_P (c) != in_ident) && !in_ident &&
- (strncmp (p, ui, sizeof (ui) - 1) == 0))
- {
- char *here = p;
- p += (sizeof (ui) - 1);
- /* There should be a law against parsing in C:
- this allows a broken USED_IF call, skipping to next macro's
- parens. *You* can fix that, I don't see how offhand. ;-) */
- while (*p && *p++ != '(')
- ;
- if (*p)
- {
- while (isspace ((unsigned char) (*p)))
- p++;
- c = *p;
- }
- else
- p = here;
- }
-
- /* Notice when we start printing a new identifier. */
+ /* Notice when we enter or leave an identifier. */
if (C_IDENTIFIER_CHAR_P (c) != in_ident)
{
if (!in_ident)
{
+ /* Entering identifier. Print as we parse. */
+ char *here; /* Target for backtracking. */
+
+ /* XEmacs addition: add support for ANSI prototypes and the
+ UNUSED macros. Hop over them. "Lisp_Object" is the only
+ C type allowed in DEFUNs. For the UNUSED macros we need
+ to eat parens, too. */
+ /* Aren't these all vulnerable to buffer overrun? I guess that
+ means that the .c is busted, so we may as well just die ... */
+
+ /* Skip over "Lisp_Object". */
+ if ((strncmp (p, lo, sizeof (lo) - 1) == 0) &&
+ isspace ((unsigned char) p[sizeof (lo) - 1]))
+ {
+ p += (sizeof (lo) - 1);
+ SKIPWHITE;
+ }
+ /* Skip over "UNUSED" or "USED_IF_*" invocation. */
+ need_paren = 1;
+ here = p;
+ if (strncmp (p, uu, sizeof (uu) - 1) == 0)
+ p += (sizeof (uu) - 1);
+ else if (strncmp (p, ui, sizeof (ui) - 1) == 0)
+ p += (sizeof (ui) - 1);
+ else
+ need_paren = 0;
+
+ if (need_paren)
+ {
+ /* Skip rest of macro name, open paren, whitespace. */
+ while (*p && C_IDENTIFIER_CHAR_P (*p))
+ p++;
+ SKIPWHITE;
+ if (*p++ == '(')
+ SKIPWHITE;
+ else
+ {
+ need_paren = 0;
+ p = here;
+ }
+ }
+ c = *p;
+
+ /* Do bookkeeping. Maybe output lambda keywords. */
in_ident = 1;
- ident_start = 1;
#if 0
/* XEmacs - This goes along with the change above. */
+ ident_start = 1;
if (need_space)
putc (' ', out);
#endif
@@ -641,7 +636,18 @@
maxargs--;
}
else
- in_ident = 0;
+ {
+ /* Leaving identifier. */
+ in_ident = 0;
+ if (need_paren)
+ {
+ SKIPWHITE;
+ if (*p == ')')
+ p++;
+ c = *p;
+ need_paren = 0;
+ }
+ }
}
/* Print the C argument list as it would appear in lisp:
@@ -705,6 +711,8 @@
if (!ellcc)
putc ('\n', out);
}
+#undef SKIPWHITE
+
/* Read through a c file. If a .o or .obj file is named,
the corresponding .c file is read instead.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches