unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#68693: 26.3; (elisp) `Profiling': Say how to use (e.g. read) a saved profile
@ 2024-01-24 17:48 Drew Adams
  2024-01-24 19:36 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2024-01-24 17:48 UTC (permalink / raw)
  To: 68693

The node says only this:

  You can save a profile to a file using 'C-x C-w'.

The doc says nothing about how to make use of such a saved profile, in
particular, how to read it into the profiler UI again.

I naively tried visiting the file and then `M-x
profiler-report-mode'. But that just showed a single line of 68K
characters.

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.19045
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''






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

* bug#68693: 26.3; (elisp) `Profiling': Say how to use (e.g. read) a saved profile
  2024-01-24 17:48 bug#68693: 26.3; (elisp) `Profiling': Say how to use (e.g. read) a saved profile Drew Adams
@ 2024-01-24 19:36 ` Eli Zaretskii
  2024-01-24 19:55   ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-01-24 19:36 UTC (permalink / raw)
  To: Drew Adams; +Cc: 68693-done

> From: Drew Adams <drew.adams@oracle.com>
> Date: Wed, 24 Jan 2024 17:48:17 +0000
> 
> The node says only this:
> 
>   You can save a profile to a file using 'C-x C-w'.
> 
> The doc says nothing about how to make use of such a saved profile, in
> particular, how to read it into the profiler UI again.

Thanks, fixed on the emacs-29 branch.

> I naively tried visiting the file and then `M-x
> profiler-report-mode'. But that just showed a single line of 68K
> characters.

Use "M-x profiler-find-profile".





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

* bug#68693: 26.3; (elisp) `Profiling': Say how to use (e.g. read) a saved profile
  2024-01-24 19:36 ` Eli Zaretskii
@ 2024-01-24 19:55   ` Drew Adams
  2024-01-24 20:14     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2024-01-24 19:55 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 68693-done@debbugs.gnu.org

> Thanks, fixed on the emacs-29 branch.
> 
> Use "M-x profiler-find-profile".

Thx.  A suggestion would be to also add
that to the menu-bar menu (if you didn't
also do that just now).





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

* bug#68693: 26.3; (elisp) `Profiling': Say how to use (e.g. read) a saved profile
  2024-01-24 19:55   ` Drew Adams
@ 2024-01-24 20:14     ` Eli Zaretskii
  2024-01-24 22:05       ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-01-24 20:14 UTC (permalink / raw)
  To: Drew Adams; +Cc: 68693

> From: Drew Adams <drew.adams@oracle.com>
> CC: "68693-done@debbugs.gnu.org" <68693-done@debbugs.gnu.org>
> Date: Wed, 24 Jan 2024 19:55:24 +0000
> 
> > Thanks, fixed on the emacs-29 branch.
> > 
> > Use "M-x profiler-find-profile".
> 
> Thx.  A suggestion would be to also add
> that to the menu-bar menu (if you didn't
> also do that just now).

I don't think it should be on the menu, for the same reason it doesn't
have a key binding: this is a relatively rare command, used only be
people who for some reason receive profiles from others.  Saving a
profile, by contrast, is a much more frequent operation.





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

* bug#68693: 26.3; (elisp) `Profiling': Say how to use (e.g. read) a saved profile
  2024-01-24 20:14     ` Eli Zaretskii
@ 2024-01-24 22:05       ` Drew Adams
  2024-01-25  7:33         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2024-01-24 22:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 68693@debbugs.gnu.org

> > > Thanks, fixed on the emacs-29 branch.
> > >
> > > Use "M-x profiler-find-profile".
> >
> > Thx.  A suggestion would be to also add
> > that to the menu-bar menu (if you didn't
> > also do that just now).
> 
> I don't think it should be on the menu, for the same reason it doesn't
> have a key binding: this is a relatively rare command, used only be
> people who for some reason receive profiles from others.  Saving a
> profile, by contrast, is a much more frequent operation.

I guess I don't understand why.  Why would
you save a profile if you don't want to
later access it?

OK, you might want to compare two profiles,
with `=', but I'd think that would be less
common than looking again at a profile that
you saved.

If you delete a profiler report buffer then
you have to profile all over again, to
revisit it.  Comparing has a key (`='), but
just revisiting doesn't.  Why?

I haven't been using profiler, so I don't
really understand its use, I guess.  What
am I missing?  Why is saving a frequent
operation but using (revisiting) a saved
profile is rare?





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

* bug#68693: 26.3; (elisp) `Profiling': Say how to use (e.g. read) a saved profile
  2024-01-24 22:05       ` Drew Adams
@ 2024-01-25  7:33         ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-01-25  7:33 UTC (permalink / raw)
  To: Drew Adams; +Cc: 68693

> From: Drew Adams <drew.adams@oracle.com>
> CC: "68693@debbugs.gnu.org" <68693@debbugs.gnu.org>
> Date: Wed, 24 Jan 2024 22:05:10 +0000
> 
> > > > Thanks, fixed on the emacs-29 branch.
> > > >
> > > > Use "M-x profiler-find-profile".
> > >
> > > Thx.  A suggestion would be to also add
> > > that to the menu-bar menu (if you didn't
> > > also do that just now).
> > 
> > I don't think it should be on the menu, for the same reason it doesn't
> > have a key binding: this is a relatively rare command, used only be
> > people who for some reason receive profiles from others.  Saving a
> > profile, by contrast, is a much more frequent operation.
> 
> I guess I don't understand why.  Why would
> you save a profile if you don't want to
> later access it?

You'd save a profile if you want to send it to someone else, or post
it in its raw form as part of a bug report.  If you want to just save
it for yourself, you can save its textual representation via
write-region.  Then it will be a text file that you can look at with
any text viewer.

> If you delete a profiler report buffer then
> you have to profile all over again, to
> revisit it.

No, see above.

> I haven't been using profiler, so I don't
> really understand its use, I guess.  What
> am I missing?  Why is saving a frequent
> operation but using (revisiting) a saved
> profile is rare?

I tried to explain that, see above.





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

end of thread, other threads:[~2024-01-25  7:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-24 17:48 bug#68693: 26.3; (elisp) `Profiling': Say how to use (e.g. read) a saved profile Drew Adams
2024-01-24 19:36 ` Eli Zaretskii
2024-01-24 19:55   ` Drew Adams
2024-01-24 20:14     ` Eli Zaretskii
2024-01-24 22:05       ` Drew Adams
2024-01-25  7:33         ` Eli Zaretskii

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).