emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111199: 2012-12-12 Daniel Colascione


From: Daniel Colascione
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111199: 2012-12-12 Daniel Colascione <address@hidden>
Date: Tue, 11 Dec 2012 19:26:52 -0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111199
committer: Daniel Colascione <address@hidden>
branch nick: trunk
timestamp: Tue 2012-12-11 19:26:52 -0800
message:
  2012-12-12  Daniel Colascione  <address@hidden>
  
        * unexcw.c (fixup_executable): use posix_fallocate to ensure that
        the dumped Emacs is not a sparse file, greatly improving Cygwin
        "make bootstrap" performance.
modified:
  src/ChangeLog
  src/unexcw.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-12-11 18:09:55 +0000
+++ b/src/ChangeLog     2012-12-12 03:26:52 +0000
@@ -1,3 +1,9 @@
+2012-12-12  Daniel Colascione  <address@hidden>
+
+       * unexcw.c (fixup_executable): use posix_fallocate to ensure that
+       the dumped Emacs is not a sparse file, greatly improving Cygwin
+       "make bootstrap" performance.
+
 2012-12-11  Michael Albinus  <address@hidden>
 
        * inotify.c (inotify_callback): Generate an Emacs event for every

=== modified file 'src/unexcw.c'
--- a/src/unexcw.c      2012-10-08 12:53:18 +0000
+++ b/src/unexcw.c      2012-12-12 03:26:52 +0000
@@ -183,6 +183,19 @@
                exe_header->file_optional_header.FileAlignment *
                exe_header->file_optional_header.FileAlignment;
 
+              /* Make sure the generated bootstrap binary isn't
+               * sparse.  NT doesn't use a file cache for sparse
+               * executables, so if we bootstrap Emacs using a sparse
+               * bootstrap-emacs.exe, bootstrap takes about twenty
+               * times longer than it would otherwise.  */
+
+              ret = posix_fallocate (fd,
+                                     ( exe_header->section_header[i].s_scnptr +
+                                       exe_header->section_header[i].s_size ),
+                                     1);
+
+              assert (ret != -1);
+
              ret =
                lseek (fd,
                       (long) (exe_header->section_header[i].s_scnptr +


reply via email to

[Prev in Thread] Current Thread [Next in Thread]