ウェブ 画像 動画 地図 ニュース グループ Gmail その他 »
最近アクセスしたグループ | ヘルプ | ログイン
Google グループ
Patch 7.2.269
現在、このグループで最初に表示するトピックが多すぎます。このトピックを最初に表示するには、別のトピックからこのオプションを削除してください。
リクエストの処理中にエラーが発生しました。 もう一度やり直してください。
フラッグ
  メッセージ 7 件 - すべて折りたたんで表示  -  すべてをに翻訳 翻訳(すべてのオリジナルを表示)
投稿先のグループは Usenet グループです。このグループにメッセージを投稿すると、インターネット上のユーザーがメール アドレスを閲覧できるようになります。
返信メッセージが送信されていません。
投稿しました。
 
差出人:
宛先:
Cc:
フォローアップ先:
Cc を追加 | フォローアップ先を追加 | 件名を編集
件名:
確認:
確認のため、下の画像に表示されている文字か、アクセシビリティ アイコンをクリックすると聞こえる数字を入力してください。 聞こえた番号を入力します
 
Bram Moolenaar  
プロフィールを表示   に翻訳 翻訳(オリジナルを表示)
 詳細オプション 11月3日, 午後8:10
差出人: Bram Moolenaar <B...@Moolenaar.net>
日付: Tue, 03 Nov 2009 12:10:56 +0100
ローカル: 2009年11月3日(火) 午後8:10
件名: Patch 7.2.269

Patch 7.2.269
Problem:    Many people struggle to find out why Vim startup is slow.
Solution:   Add the --startuptime command line flag.
Files:      runtime/doc/starting.txt, src/globals.h, src/feature.h,
            src/main.c, src/macros.h

*** ../vim-7.2.268/runtime/doc/starting.txt     2008-11-09 13:43:25.000000000 +0100
--- runtime/doc/starting.txt    2009-10-25 11:57:51.000000000 +0100
***************
*** 144,149 ****
--- 144,156 ----
                        -u NORC                 no                  yes
                        --noplugin              yes                 no

+ --startuptime={fname}                                 *--startuptime*
+               During startup write timing messages to the file {fname}.
+               This can be used to find out where time is spent while loading
+               your .vimrc and plugins.
+               When {fname} already exists new messages are appended.
+               {only when compiled with this feature}
+
                                                        *--literal*
  --literal     Take file names literally, don't expand wildcards.  Not needed
                for Unix, because Vim always takes file names literally (the
***************
*** 471,476 ****
--- 487,493 ----
                window title and copy/paste using the X clipboard.  This
                avoids a long startup time when running Vim in a terminal
                emulator and the connection to the X server is slow.
+               See |--startuptime| to find out if affects you.
                Only makes a difference on Unix or VMS, when compiled with the
                |+X11| feature.  Otherwise it's ignored.
                To disable the connection only for specific terminals, see the
*** ../vim-7.2.268/src/globals.h        2009-07-29 12:09:49.000000000 +0200
--- src/globals.h       2009-10-10 15:14:31.000000000 +0200
***************
*** 1567,1572 ****
--- 1567,1576 ----
  /* For undo we need to know the lowest time possible. */
  EXTERN time_t starttime;

+ #ifdef STARTUPTIME
+ EXTERN FILE *time_fd INIT(= NULL);  /* where to write startup timing */
+ #endif
+
  /*
   * Some compilers warn for not using a return value, but in some situations we
   * can't do anything useful with the value.  Assign to this variable to avoid
*** ../vim-7.2.268/src/feature.h        2008-11-09 13:43:25.000000000 +0100
--- src/feature.h       2009-10-10 16:16:19.000000000 +0200
***************
*** 844,853 ****
  /* #define DEBUG */

  /*
!  * STARTUPTIME                Time the startup process.  Writes a "vimstartup" file
!  *                    with timestamps.
   */
! /* #define STARTUPTIME "vimstartup" */

  /*
   * MEM_PROFILE                Debugging of memory allocation and freeing.
--- 844,857 ----
  /* #define DEBUG */

  /*
!  * STARTUPTIME                Time the startup process.  Writes a file with
!  *                    timestamps.
   */
! #if defined(FEAT_NORMAL) \
!       && ((defined(HAVE_GETTIMEOFDAY) && defined(HAVE_SYS_TIME_H)) \
!               || defined(WIN3264))
! # define STARTUPTIME 1
! #endif

  /*
   * MEM_PROFILE                Debugging of memory allocation and freeing.
*** ../vim-7.2.268/src/main.c   2009-05-26 22:58:43.000000000 +0200
--- src/main.c  2009-10-10 16:18:32.000000000 +0200
***************
*** 130,139 ****
  #endif

- #ifdef STARTUPTIME
- static FILE *time_fd = NULL;
- #endif
-
  /*
   * Different types of error messages.
   */
--- 130,135 ----
***************
*** 173,178 ****
--- 169,177 ----
      char_u    *fname = NULL;          /* file name from command line */
      mparm_T   params;                 /* various parameters passed between
                                         * main() and other functions. */
+ #ifdef STARTUPTIME
+     int               i;
+ #endif

      /*
       * Do any system-specific initialisations.  These can NOT use IObuff or
***************
*** 203,210 ****
  #endif

  #ifdef STARTUPTIME
!     time_fd = mch_fopen(STARTUPTIME, "a");
!     TIME_MSG("--- VIM STARTING ---");
  #endif
      starttime = time(NULL);

--- 202,216 ----
  #endif

  #ifdef STARTUPTIME
!     for (i = 1; i < argc; ++i)
!     {
!       if (STRNICMP(argv[i], "--startuptime=", 14) == 0)
!       {
!           time_fd = mch_fopen(argv[i] + 14, "a");
!           TIME_MSG("--- VIM STARTING ---");
!           break;
!       }
!     }
  #endif
      starttime = time(NULL);

***************
*** 1150,1155 ****
--- 1156,1173 ----
            cursor_on();

            do_redraw = FALSE;
+
+ #ifdef STARTUPTIME
+           /* Now that we have drawn the first screen all the startup stuff
+            * has been done, close any file for startup messages. */
+           if (time_fd != NULL)
+           {
+               TIME_MSG("first screen update");
+               TIME_MSG("--- VIM STARTED ---");
+               fclose(time_fd);
+               time_fd = NULL;
+           }
+ #endif
        }
  #ifdef FEAT_GUI
        if (need_mouse_correct)
***************
*** 1743,1748 ****
--- 1761,1770 ----
                    /* already processed, skip */
                }
  #endif
+               else if (STRNICMP(argv[0] + argv_idx, "startuptime", 11) == 0)
+               {
+                   /* already processed, skip */
+               }
                else
                {
                    if (argv[0][argv_idx])
***************
*** 3211,3216 ****
--- 3233,3252 ----

  static struct timeval prev_timeval;

+ # ifdef WIN3264
+ /*
+  * Windows doesn't have gettimeofday(), although it does have struct timeval.
+  */
+     static int
+ gettimeofday(struct timeval *tv, char *dummy)
+ {
+     long t = clock();
+     tv->tv_sec = t / CLOCKS_PER_SEC;
+     tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC;
+     return 0;
+ }
+ # endif
+
  /*
   * Save the previous time before doing something that could nest.
   * set "*tv_rel" to the time elapsed so far.
***************
*** 3299,3318 ****
      }
  }

- # ifdef WIN3264
- /*
-  * Windows doesn't have gettimeofday(), although it does have struct timeval.
-  */
-     int
- gettimeofday(struct timeval *tv, char *dummy)
- {
-     long t = clock();
-     tv->tv_sec = t / CLOCKS_PER_SEC;
-     tv->tv_usec = (t - tv->tv_sec * CLOCKS_PER_SEC) * 1000000 / CLOCKS_PER_SEC;
-     return 0;
- }
- # endif
-
  #endif

  #if defined(FEAT_CLIENTSERVER) || defined(PROTO)
--- 3335,3340 ----
*** ../vim-7.2.268/src/macros.h 2009-05-17 13:30:58.000000000 +0200
--- src/macros.h        2009-10-10 15:19:07.000000000 +0200
***************
*** 243,249 ****
  #endif

  #ifdef STARTUPTIME
! # define TIME_MSG(s) time_msg(s, NULL)
  #else
  # define TIME_MSG(s)
  #endif
--- 243,249 ----
  #endif

  #ifdef STARTUPTIME
! # define TIME_MSG(s) { if (time_fd != NULL) time_msg(s, NULL); }
  #else
  # define TIME_MSG(s)
  #endif
*** ../vim-7.2.268/src/version.c        2009-11-03 11:43:05.000000000 +0100
--- src/version.c       2009-11-03 12:06:31.000000000 +0100
***************
*** 678,679 ****
--- 678,681 ----
  {   /* Add new patch number below this line */
+ /**/
+     269,
  /**/

--
BEDEVERE: Look!  It's the old man from scene 24 - what's he Doing here?
ARTHUR:   He is the keeper of the Bridge.  He asks each traveler five
          questions ...
GALAHAD:  Three questions.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- B...@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///


    返信    投稿者に返信    転送  
メッセージを投稿するには、ログインする必要があります。
メッセージを投稿するには、まず最初にこのグループに参加する必要があります。
投稿する前に、[設定] ページでニックネームを更新してください。
投稿に必要な権限がありません。
François Ingelrest  
プロフィールを表示   に翻訳 翻訳(オリジナルを表示)
 詳細オプション 11月3日, 午後9:16
差出人: François Ingelrest <francois.ingelr...@gmail.com>
日付: Tue, 3 Nov 2009 13:16:50 +0100
ローカル: 2009年11月3日(火) 午後9:16
件名: Re: Patch 7.2.269

On Tue, Nov 3, 2009 at 12:10, Bram Moolenaar <B...@moolenaar.net> wrote:
> Patch 7.2.269
> Problem:    Many people struggle to find out why Vim startup is slow.
> Solution:   Add the --startuptime command line flag.
> Files:      runtime/doc/starting.txt, src/globals.h, src/feature.h,
>            src/main.c, src/macros.h

Wow, this is very cool and can be very handy. Thanks!

    返信    投稿者に返信    転送  
メッセージを投稿するには、ログインする必要があります。
メッセージを投稿するには、まず最初にこのグループに参加する必要があります。
投稿する前に、[設定] ページでニックネームを更新してください。
投稿に必要な権限がありません。
Dominique Pellé  
プロフィールを表示   に翻訳 翻訳(オリジナルを表示)
 詳細オプション 11月4日, 午前3:16
差出人: Dominique Pellé <dominique.pe...@gmail.com>
日付: Tue, 3 Nov 2009 19:16:12 +0100
ローカル: 2009年11月4日(水) 午前3:16
件名: Re: Patch 7.2.269

Bram Moolenaar wrote:
> Patch 7.2.269
> Problem:    Many people struggle to find out why Vim startup is slow.
> Solution:   Add the --startuptime command line flag.
> Files:      runtime/doc/starting.txt, src/globals.h, src/feature.h,
>            src/main.c, src/macros.h

That's useful.

Shouldn't "vim --help" list the option --startuptime=<file>
Attached patch adds it.

I notice that it seems to be the only option to require an
equal sign '=' between the command line flag and its argument.

-- Dominique

  fix-missing-startuptime-in-usage.patch
< 1K ダウンロード

    返信    投稿者に返信    転送  
メッセージを投稿するには、ログインする必要があります。
メッセージを投稿するには、まず最初にこのグループに参加する必要があります。
投稿する前に、[設定] ページでニックネームを更新してください。
投稿に必要な権限がありません。
Bram Moolenaar  
プロフィールを表示   に翻訳 翻訳(オリジナルを表示)
 詳細オプション 11月4日, 午前6:46
差出人: Bram Moolenaar <B...@Moolenaar.net>
日付: Tue, 03 Nov 2009 22:46:18 +0100
ローカル: 2009年11月4日(水) 午前6:46
件名: Re: Patch 7.2.269

Dominique Pelle wrote:

> > Patch 7.2.269
> > Problem:    Many people struggle to find out why Vim startup is slow.
> > Solution:   Add the --startuptime command line flag.
> > Files:      runtime/doc/starting.txt, src/globals.h, src/feature.h,
> >            src/main.c, src/macros.h

> That's useful.

> Shouldn't "vim --help" list the option --startuptime=<file>
> Attached patch adds it.

> I notice that it seems to be the only option to require an
> equal sign '=' between the command line flag and its argument.

Yeah, that's inconsistent.  Shall we change it to
        vim --startuptime <file>

--
The Law, in its majestic equality, forbids the rich, as well as the
poor, to sleep under the bridges, to beg in the streets, and to steal
bread.                       -- Anatole France

 /// Bram Moolenaar -- B...@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///


    返信    投稿者に返信    転送  
メッセージを投稿するには、ログインする必要があります。
メッセージを投稿するには、まず最初にこのグループに参加する必要があります。
投稿する前に、[設定] ページでニックネームを更新してください。
投稿に必要な権限がありません。
Richard Hartmann  
プロフィールを表示   に翻訳 翻訳(オリジナルを表示)
 詳細オプション 11月8日, 午後7:37
差出人: Richard Hartmann <richih.mailingl...@gmail.com>
日付: Sun, 8 Nov 2009 11:37:59 +0100
ローカル: 2009年11月8日(日) 午後7:37
件名: Re: Patch 7.2.269
2009/11/3 Bram Moolenaar <B...@moolenaar.net>:

> Yeah, that's inconsistent.  Shall we change it to
>        vim --startuptime <file>

Aye from me. Also, it should default to a reasonable filename if none is
given. Personally, I'd suggest

  vim_startup.

Also, wouldn't it make more sense to create a new file instead of
appending? Two possible solutions are a counter and a timestamp. So a
filename like

  vim_startup.20091108-113425

might be a good solution. I.e.

  $filename.$ISO_DATE.$HHMMSS

optionally interspersed with dashes and dots to increase legibility.

Richard


    返信    投稿者に返信    転送  
メッセージを投稿するには、ログインする必要があります。
メッセージを投稿するには、まず最初にこのグループに参加する必要があります。
投稿する前に、[設定] ページでニックネームを更新してください。
投稿に必要な権限がありません。
Bram Moolenaar  
プロフィールを表示   に翻訳 翻訳(オリジナルを表示)
 詳細オプション 11月8日, 午後9:19
差出人: Bram Moolenaar <B...@Moolenaar.net>
日付: Sun, 08 Nov 2009 13:19:46 +0100
ローカル: 2009年11月8日(日) 午後9:19
件名: Re: Patch 7.2.269

Richard Hartmann wrote:
> 2009/11/3 Bram Moolenaar <B...@moolenaar.net>:

> > Yeah, that's inconsistent.  Shall we change it to
> >  vim --startuptime <file>

> Aye from me. Also, it should default to a reasonable filename if none is
> given. Personally, I'd suggest

>   vim_startup.

I rather avoid using a default name, because it's easy to accidentally
overwrite an existing file.  And it would require another flag to
specify the name when you want to, because you don't know if the
argument that follows is a log file name or a file to be edited.  And
the files with the default name would be written in the current
directory, which makes this even more tricky.

> Also, wouldn't it make more sense to create a new file instead of
> appending? Two possible solutions are a counter and a timestamp. So a
> filename like

>   vim_startup.20091108-113425

> might be a good solution. I.e.

>   $filename.$ISO_DATE.$HHMMSS

> optionally interspersed with dashes and dots to increase legibility.

The idea is that you get a log of startups in one file.  So you can have
Vim startup a dozen times, and then look in the log file what happened.
Writing all different files makes this a bit more complicated.

Appending also avoids that when you accidentally give an existing file
name it's overwritten.

--
If you only have a hammer, you tend to see every problem as a nail.
If you only have MS-Windows, you tend to solve every problem by rebooting.

 /// Bram Moolenaar -- B...@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///


    返信    投稿者に返信    転送  
メッセージを投稿するには、ログインする必要があります。
メッセージを投稿するには、まず最初にこのグループに参加する必要があります。
投稿する前に、[設定] ページでニックネームを更新してください。
投稿に必要な権限がありません。
Richard Hartmann  
プロフィールを表示   に翻訳 翻訳(オリジナルを表示)
 詳細オプション 11月8日, 午後11:52
差出人: Richard Hartmann <richih.mailingl...@gmail.com>
日付: Sun, 8 Nov 2009 15:52:14 +0100
ローカル: 2009年11月8日(日) 午後11:52
件名: Re: Patch 7.2.269
2009/11/8 Bram Moolenaar <B...@moolenaar.net>:

> I rather avoid using a default name, because it's easy to accidentally
> overwrite an existing file.

Not if you append a counter or similar to the filename.

>  And it would require another flag to
> specify the name when you want to, because you don't know if the
> argument that follows is a log file name or a file to be edited.

There is that. Good point.

>  And
> the files with the default name would be written in the current
> directory, which makes this even more tricky.

Same problem as with file names you specify.

> The idea is that you get a log of startups in one file.  So you can have
> Vim startup a dozen times, and then look in the log file what happened.
> Writing all different files makes this a bit more complicated.

Depends on the format you use. Personally, I woud tend to use vimdiff
if possible.

> Appending also avoids that when you accidentally give an existing file
> name it's overwritten.

Arguably, that is worse as it could destroy the syntax of data in an
existing file. The problem can be avoided by appending to the filename.
Clutter vs data safety, so to speak.

Richard


    返信    投稿者に返信    転送  
メッセージを投稿するには、ログインする必要があります。
メッセージを投稿するには、まず最初にこのグループに参加する必要があります。
投稿する前に、[設定] ページでニックネームを更新してください。
投稿に必要な権限がありません。
メッセージの終わり
« ディスカッションに戻る « 新しいトピック     過去のトピック »

グループを作成 - Google グループ - Google ホーム - 利用規約 - プライバシー ポリシー
©2009 Google