[mew-dist 27253] Re: slow encryption in mew-5.1.50
Kazu Yamamoto ( 山本和彦 )
kazu at example.com
2006年 8月 25日 (金) 09:59:06 JST
木下さん、
> いいえ、バイナリファイルを数MB添付して、PGP (GnuPG 1.4.5)を使った
> 場合です。
> mew-encode.el (mew-save-transfer-form)での下記の変更を元に戻すと、
> 1〜2秒程度で済むようになりました。
分かりました。これで直ると思います。
--かず
Index: mew-encode.el
===================================================================
RCS file: /cvsroot/mew/mew/mew-encode.el,v
retrieving revision 1.100
diff -c -r1.100 mew-encode.el
*** mew-encode.el 15 Aug 2006 05:53:22 -0000 1.100
--- mew-encode.el 25 Aug 2006 00:57:52 -0000
***************
*** 886,892 ****
(defun mew-save-transfer-form (beg end retain &optional cte)
;; called in the narrowed region
! (let ((sbeg beg) (send end) (draft-buf (current-buffer)) tmpbuf file)
(if retain
(progn
(setq tmpbuf (generate-new-buffer mew-buffer-prefix))
--- 886,894 ----
(defun mew-save-transfer-form (beg end retain &optional cte)
;; called in the narrowed region
! (let ((sbeg beg) (send end) (draft-buf (current-buffer))
! (ocs mew-cs-text-for-net)
! tmpbuf file)
(if retain
(progn
(setq tmpbuf (generate-new-buffer mew-buffer-prefix))
***************
*** 898,913 ****
(if (and cte (mew-case-equal cte mew-bin)
(re-search-forward mew-eoh))
(progn
(forward-line)
(save-restriction
(narrow-to-region sbeg (point))
(goto-char sbeg)
(mew-lf-to-crlf)))
! (mew-lf-to-crlf))
(setq send (point-max))
(setq file (mew-make-temp-name))
(mew-frwlet
! mew-cs-dummy mew-cs-binary
(write-region sbeg send file nil 'no-msg))
(if retain
(mew-remove-buffer tmpbuf)
--- 900,918 ----
(if (and cte (mew-case-equal cte mew-bin)
(re-search-forward mew-eoh))
(progn
+ (setq ocs mew-cs-binary)
(forward-line)
(save-restriction
(narrow-to-region sbeg (point))
(goto-char sbeg)
(mew-lf-to-crlf)))
! (unless mew-cs-text-for-net
! (goto-char sbeg) ;; just in case
! (mew-lf-to-crlf)))
(setq send (point-max))
(setq file (mew-make-temp-name))
(mew-frwlet
! mew-cs-dummy ocs
(write-region sbeg send file nil 'no-msg))
(if retain
(mew-remove-buffer tmpbuf)
Mew-dist メーリングリストの案内