emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Maxim Nikulin <manikulin@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: [PATCH] Re: Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)]
Date: Wed, 24 Mar 2021 22:11:38 +0800	[thread overview]
Message-ID: <87y2ec4p5x.fsf@localhost> (raw)
In-Reply-To: <s3fbg3$gld$1@ciao.gmane.io>

Maxim Nikulin <manikulin@gmail.com> writes:

> Example for #+STARTUP: overview:
>
> org-activate-links  560         0.028971085   5.173...e-05
>
> For content number of calls is 410, without special settings (all) 120,
> let me remind that it is for 10 find-file invocations. Another example
>
> org-activate-links  410         0.1384633219  0.0003377154

I repeated your benchmark on my largest working file (~14k links):

;; with patch
;; org-activate-links  400         0.0259791009  6.494...e-05
;; org-activate-links  400         0.0114822140  2.870...e-05
;; org-activate-links  400         0.0255080609  6.377...e-05
;; without patch
;; org-activate-links  400         0.0297167870  7.429...e-05
;; org-activate-links  400         0.0149334709  3.733...e-05
;; org-activate-links  400         0.0105385180  2.634...e-05

There is not much difference indeed. I guess, there was something about
my config and external packages.

> I see such variations in both cases with and without the patch, but 
> these numbers are negligible in my opinion.

Your benchmark is measuring is jit-lock - there will be no reliable
result as jit-lock is timer-based.

I did more reliable version as well:

(progn
  (require 'elp)
  (require 'org-element)
  (setq elp-function-list (list #'org-activate-links))
  (elp-instrument-list nil)
  (dolist (i (number-sequence 1 10))
    (message "iter %d" i)
    (find-file "~/Org/notes.org")
    (font-lock-ensure) ;; Force fontification in all the buffer
    (sit-for 1)
    (kill-buffer "notes.org")
    (sit-for 1))
  (elp-results))

Results are not different though (time-per-single-call):

;; with patch + font-lock-ensure
;; org-activate-links  163290      9.720667509   5.953...e-05
;; org-activate-links  163290      9.8090518640  6.007...e-05
;; without patch + font-lock-ensure
;; org-activate-links  163290      9.9175657860  6.073...e-05
;; org-activate-links  163290      10.073281878  6.168...e-05

This latter case was what was happening with my config. Some package was
causing full buffer fontification.

> In my opinion, combining changes related to white spaces and meaningful 
> modifications makes commits less clear, especially when reading email. 
> However the following recommendation has certainly more weight:
>
> https://orgmode.org/list/87zh2hosex.fsf@bzg.fr/ From: Bastien
>> Also, the convention in Emacs is to avoid whitespaces-only commits,
>> you need to fix whitespaces within other non-whitespaces changes in
>> a commit.

Actually, I feel confused now. I remember that message from Bastien, but
now I cannot recall what is considered "fix whitespaces". Do we use
tab-convention or space-convention?

I think I will better clear the whitespace staff in the patch before I
understand the whitespace policy more clearly. At least, the patch will
be more readable.

Best,
Ihor


  reply	other threads:[~2021-03-24 14:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-13  2:56 Bug: Plain https links with brackets are not recognised [9.4.4 (release_9.4.4-625-g763c7a @ /home/yantar92/.emacs.d/straight/build/org/)] Ihor Radchenko
2021-03-13  3:23 ` Kyle Meyer
2021-03-13  5:21   ` [PATCH] " Ihor Radchenko
2021-03-13  5:24     ` Ihor Radchenko
2021-03-15 11:54       ` Maxim Nikulin
2021-03-16 12:35         ` Ihor Radchenko
2021-03-17 14:59           ` Maxim Nikulin
2021-03-19 15:07             ` Ihor Radchenko
2021-03-24 12:31               ` Maxim Nikulin
2021-03-24 14:11                 ` Ihor Radchenko [this message]
2021-03-19 12:10           ` Maxim Nikulin
2021-03-19 15:40             ` Ihor Radchenko
2021-03-24 12:51 ` Nicolas Goaziou
2021-03-24 13:10   ` Ihor Radchenko
2021-03-24 14:13     ` Ihor Radchenko
2021-05-15  8:34       ` Bastien

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=87y2ec4p5x.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    /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).