emacs-devel
[Top][All Lists]
Advanced

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

Re: master 2f181d60323 3/6: pp.el (pp-fill): New default pp function


From: Michael Heerdegen
Subject: Re: master 2f181d60323 3/6: pp.el (pp-fill): New default pp function
Date: Sat, 15 Jul 2023 04:48:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> > I only want to give the hint that this `forward-sexp' in the last line
> > will error when the programmer has, e.g., commented out the body of a
> > lambda expression.  Or the user wants to fill automatically created code
> > that looks like that, for whatever reason.
>
> Hmm... I don't quite understand what you mean...
> Oh, are you thinking of when `lif` is a number larger than the number of
> elements in the list?

Yes.

> Indeed, I think we'll burp then.  I'll take a look at that.

Thanks.  I would vote for silently ignoring and falling back to default
indentation.


BTW, we had a thread in the Gnus mailing list
(info-gnus-english@gnu.org) about `pp-fill'.  Now that it's the default
pp behavior, Gnus score files will be filled using this function before
saving.  I don't use score files, could be using this function is not
appropriate for this kind of data.

Anyway, a user reported a massive slowdown after you had made that
change (thread "slow saving of scores when leaving a virtual (nnml+)
group"), and posted this profiler output:

| Cpu report (partly expanded):
| 
|        10133  79% - command-execute
|         8519  66%  - funcall-interactively
|         4767  37%   - gnus-summary-exit
|         4659  36%    - gnus-score-save
|         4655  36%     - gnus-pp
|         4655  36%      - pp
|         4655  36%       - pp-to-string
|         4655  36%        - pp-fill
|         4647  36%         - pp--object
|         4627  36%          - pp-fill
|         4615  36%           - pp-fill
|         4555  35%            - pp-fill
|         4263  33%             - pp-fill
|         4243  33%              - indent-according-to-mode
|         4243  33%               - lisp-indent-line
|         4163  32%                - calculate-lisp-indent
|         4163  32%                 - lisp-indent-function
|         4163  32%                    lisp--local-defform-body-p
|           48   0%                + lisp-ppss
|          240   1%             + indent-according-to-mode
|           72   0%    + gnus-run-hooks
|           32   0%    + gnus-close-group
|            4   0%    + gnus-summary-update-info
|         3688  28%   + gnus-topic-select-group
|           60   0%   + file-notify-handle-event
|            3   0%   + execute-extended-command
|         1614  12%  + byte-code
|         2260  17%   Automatic GC
|          407   3% + timer-event-handler
|            0   0%   ...

Dunno if it is interesting for you.  So far I don't know how the data
looked like, but we can request it from the user.  After changing
`pp-default-function' to 'pp-28' the user is happy.


Michael.




reply via email to

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