emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Babel evaluation: location and timing information
Date: Thu, 22 Sep 2022 19:15:41 +0700	[thread overview]
Message-ID: <tghjle$2us$1@ciao.gmane.io> (raw)
In-Reply-To: <87pmfn99fc.fsf@tec.tecosaur.net>

On 22/09/2022 14:03, Timothy wrote:
>> On 18/09/2022 10:09, Timothy wrote:
>>> and now this might look like so:
>>> ┌────
>>> │ executing Emacs-Lisp call on line 143…
>>> │ Code block evaluation complete (took 0.2s).
>>> └────
>>
>> I do not mind to have such feature, but I am unsure concerning its price. I just
>> have tried
>>
>> (benchmark-run 1 (line-number-at-pos))
>>
>> (2.244481896 0 0.0)
>>
> What on earth did you run that on? I ran that on the last line of the Org manual
> and here’s what I got:
> 
> ┌────
> │ (0.000219268 0 0.0)
> └────

Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz
It is an 8 years old laptop, minimal CPU frequency is 0.8GHz.

Org manual is ~5 times smaller than my file with notes and the former 
contains not so much not ASCII characters.

For your test I get reasonable numbers
Emacs-26 0.038 or 0.084
Emacs-27 0.0066 or 0.0092

I am comfortable with performance. It seems, some optimization has been 
done in Emacs since 26 release. I do not see dependence on Org version.

While I work with my notes file, performance degrades after some 
operations. E.g. searches become significantly slower after caching 
refile targets. Previous discussion of the issue:
Ihor Radchenko. Re: profiling latency in large org-mode buffers (under 
both main & org-fold feature) Sun, 27 Feb 2022 14:43:29 +0800. 
https://list.orgmode.org/87y21wkdwu.fsf@localhost

My experience is that e.g. emacsclient with particular line causes 
several seconds hang.

Despite improvements since Emacs-26 in line counting, still I believe 
that the `line-number-at-pos' function may still be excessively 
expensive in real live when unconditionally used just for a bit nicer 
logging.



  reply	other threads:[~2022-09-22 13:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-18  3:09 [PATCH] Babel evaluation: location and timing information Timothy
2022-09-19 12:28 ` Fraga, Eric
2022-09-19 14:52 ` Max Nikulin
2022-09-22  7:03   ` Timothy
2022-09-22 12:15     ` Max Nikulin [this message]
2022-09-23  2:22       ` Ihor Radchenko
2022-09-23 16:21         ` line-number-at-pos performance and cache-long-scans Max Nikulin
2022-09-20  8:29 ` [PATCH] Babel evaluation: location and timing information Ihor Radchenko
2022-09-22  7:05   ` Timothy
2022-09-23  2:27     ` Ihor Radchenko
2022-09-23 16:46 ` [PATCH] Babel evaluation: location and timing information (v2) Timothy
2022-09-24  3:11   ` Ihor Radchenko
2022-09-24  9:12     ` Timothy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='tghjle$2us$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).