unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#13795: 24.3.50; epa-insert-keys improvements
@ 2013-02-23 18:57 Richard Stallman
  2020-12-06 19:07 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2013-02-23 18:57 UTC (permalink / raw)
  To: 13795


epa-insert-keys is slow to start.  If I use it multiple times
in a row, it is slow each time.

It should check whether the keyring has changed since the previous
call to epa-insert-keys.  If not, it should use the same buffer
contents.

The slowness is surprising -- maybe it can be sped up.


In GNU Emacs 24.3.50.4 (mips64el-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2013-02-02 on chiefs-gnewsense
Bzr revision: 111655 christopher@ch.ristopher.com-20130201171924-mqojkjw974mj7ndq
System Description:	Debian GNU/Linux 6.0.6 (squeeze)

Configured using:
 `configure CFLAGS=-O0 -g --with-gif=no --with-tiff=no --no-create
 --no-recursion'

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: RMAIL

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  gpm-mouse-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
L D SPC m a k e SPC i t SPC l a t e r SPC i f SPC t 
h a t SPC s u i t s SPC y o u . C-n C-p C-k C-a C-k 
C-o I SPC s e e . SPC SPC I SPC t h i n k SPC i t SPC 
i s SPC b e s t SPC t o SPC e x p e c t SPC m e SPC 
a r o u n d SPC 5 p m . C-n C-c C-c d x SPC C-n C-n 
C-n ESC v C-n C-n C-@ C-n C-n r ESC , RET T h a t SPC 
s e e m s SPC g o o d SPC t o o . RET C-c C-c C-d C-d 
C-d C-d ESC n u SPC SPC C-d C-d C-d x g n x SPC d x 
C-@ C-x b o l d RET C-x b t r i p s RET ESC < C-u C-n 
C-v C-p C-p C-e C-@ ESC b ESC b ESC b ESC b ESC b ESC 
b ESC f ESC f ESC f C-f C-f C-x C-x C-b ESC w C-x 4 
m C-y C-n S i g n e d SPC k e y C-n C-n C-n ESC x e 
p a SPC i s DEL n s TAB RET ESC > ESC b m C-c C-c C-x 
o C-c C-s C-_ C-p C-p C-p C-e ESC b ESC b ESC d M y 
C-n C-n C-n ESC x ESC p RET C-u C-n C-n C-n m C-c C-c 
C-x o C-c C-c ESC x r e p o r t SPC e m a c v s DEL 
DEL s SPC b u g RET

Recent messages:
Expunging deleted messages...done
Mark activated
Mark set [4 times]
Sending...
Wrote /home/rms/outgoing/out-3
Sending...done
Undo!
Sending...
Wrote /home/rms/outgoing/out-4
Sending...done

Load-path shadows:
None found.

Features:
(wid-edit novice log-view vc-rcs rlogin unrmail epa-mail epa derived
epg epg-config two-column kmacro iso-transl mule-diag goto-addr
thingatpt view etags mail-extr shadow emacsbug bug-reference diff
cc-langs cl cl-lib cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs dired-aux mule-util
cal-move cal-menu calendar cal-loaddefs log-edit pcvs-util add-log
diff-mode easy-mmode vc vc-dispatcher rmailsum rect parse-time vc-cvs
sgml-mode gnus-util mailcap find-func vc-bzr jka-compr rmailout
dabbrev shell pcomplete grep compile comint ansi-color ring misearch
multi-isearch quail help-mode mailalias qp rmailmm message sendmail
format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode
mailabbrev gmm-utils mailheader mail-parse rfc2231 dired t-mouse
time-date rmailedit rmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils paren cus-start cus-load nadvice advice help-fns
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#13795: 24.3.50; epa-insert-keys improvements
  2013-02-23 18:57 bug#13795: 24.3.50; epa-insert-keys improvements Richard Stallman
@ 2020-12-06 19:07 ` Lars Ingebrigtsen
  2020-12-07  5:56   ` Richard Stallman
  2020-12-07  5:56   ` Richard Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-06 19:07 UTC (permalink / raw)
  To: Richard Stallman; +Cc: 13795

Richard Stallman <rms@gnu.org> writes:

> epa-insert-keys is slow to start.  If I use it multiple times
> in a row, it is slow each time.
>
> It should check whether the keyring has changed since the previous
> call to epa-insert-keys.  If not, it should use the same buffer
> contents.
>
> The slowness is surprising -- maybe it can be sped up.

epa-insert-keys is very fast for me (but I don't have a very large key
ring).

Are you still seeing this issue in more recent versions of Emacs?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#13795: 24.3.50; epa-insert-keys improvements
  2020-12-06 19:07 ` Lars Ingebrigtsen
@ 2020-12-07  5:56   ` Richard Stallman
  2020-12-07  5:56   ` Richard Stallman
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2020-12-07  5:56 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 13795

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Are you still seeing this issue in more recent versions of Emacs?

I am running master from June.  epa-insert-keys just took 7 seconds
to insert 700 keys.  Maybe it couldn't do that job faster, but it
could cache the result and make it very fast if the keyring is unchanged.

It could even store the output in a file and compare that file's
mtime with that of the keyring.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#13795: 24.3.50; epa-insert-keys improvements
  2020-12-06 19:07 ` Lars Ingebrigtsen
  2020-12-07  5:56   ` Richard Stallman
@ 2020-12-07  5:56   ` Richard Stallman
  2020-12-07 15:11     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2020-12-07  5:56 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 13795

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Are you still seeing this issue in more recent versions of Emacs?

I am running master from June.  epa-insert-keys just took 6 seconds
to insert 700 keys.  I still have a build of master from Oct 2019;
epa-insert-keys took the same time in that version.

I don't remember when I reported this problem or with which Emacs
version, or how long the operation took.

Maybe that conversion job could not be done faster, but epa could save
the resulting text.  That would make it very fast if the keyring is
unchanged.

It could save the text in a file, and compare that file's mtime with
that of the keyring to see whether to regenerate the file.  That way,
the memoization will work from one Emacs session to another.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#13795: 24.3.50; epa-insert-keys improvements
  2020-12-07  5:56   ` Richard Stallman
@ 2020-12-07 15:11     ` Lars Ingebrigtsen
  2020-12-08  5:35       ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-07 15:11 UTC (permalink / raw)
  To: Richard Stallman; +Cc: 13795

Richard Stallman <rms@gnu.org> writes:

> I am running master from June.  epa-insert-keys just took 6 seconds
> to insert 700 keys.  I still have a build of master from Oct 2019;
> epa-insert-keys took the same time in that version.

Yes, that sounds uncomfortably slow.

Hm...  is there any way to inject hundreds of keys into the key ring to
make it easier to test what part of this is taking time.  Anybody know?

If it's external (i.e., the gpg tools are slow), then we should cache
the results -- otherwise we should fix the code on the Emacs side to be
faster.

> It could save the text in a file, and compare that file's mtime with
> that of the keyring to see whether to regenerate the file.  That way,
> the memoization will work from one Emacs session to another.

I think caching the data in a file would be more bother than it's worth,
but we could certainly cache the data in-memory during an Emacs session.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#13795: 24.3.50; epa-insert-keys improvements
  2020-12-07 15:11     ` Lars Ingebrigtsen
@ 2020-12-08  5:35       ` Richard Stallman
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2020-12-08  5:35 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 13795

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > It could save the text in a file, and compare that file's mtime with
  > > that of the keyring to see whether to regenerate the file.  That way,
  > > the memoization will work from one Emacs session to another.

  > I think caching the data in a file would be more bother than it's worth,

It would hardly be any bother.  One function call can write it,
and one function call can read it.  It might be just as easy as caching
in a buffer.

But caching in a buffer would provide most of the benefit of caching
in a file.


-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-08  5:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-23 18:57 bug#13795: 24.3.50; epa-insert-keys improvements Richard Stallman
2020-12-06 19:07 ` Lars Ingebrigtsen
2020-12-07  5:56   ` Richard Stallman
2020-12-07  5:56   ` Richard Stallman
2020-12-07 15:11     ` Lars Ingebrigtsen
2020-12-08  5:35       ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).