all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Pettersson <daniel@dpettersson.net>
Cc: 69241@debbugs.gnu.org, joaotavora@gmail.com
Subject: bug#69241: Fixed patch issues
Date: Mon, 11 Mar 2024 15:11:38 +0200	[thread overview]
Message-ID: <86edcgvrp1.fsf@gnu.org> (raw)
In-Reply-To: <m2wmq9xfuh.fsf@dpettersson.net> (message from Daniel Pettersson on Mon, 11 Mar 2024 10:44:38 +0100)

> From: Daniel Pettersson <daniel@dpettersson.net>
> Cc: Eli Zaretskii <eliz@gnu.org>,  69241@debbugs.gnu.org
> Date: Mon, 11 Mar 2024 10:44:38 +0100
> 
> João Távora <joaotavora@gmail.com> writes:
> 
> > The calls must be processed in the order of the queue though, but in
> > theory that shouldn't lead to O(N^2) if a suitable technique is found (perhaps
> > different from (run-at-time 0)).
> 
> The first patch I sent had this issue of them being process out of
> order.  But the second patch ensures that they are handled correctly.
> It may look like they don't but they do :)
> 
> 1. We push each message on 'jsonrpc-mqueue (Order is reversed)
> 2. We pop each item of 'jsonrpc-mqueue and push (Guaranteed by sharing
> the same `time' for each timer) the item on `timer-list'.
> 3. Timers are evaluated in the order of `timer-list'.

Can't the code activate the timers in reverse order?  Then each
timer--activate will likely compare with just one timer, the first
one.

> This is not that straight forward and loops back to my point of relying
> on timer.el internals, but as I see it there is no other way, if one
> would like to get around the internal sorting of timers in timer.el
> which I would very much like to do.

Timers must fire in the order of their time, so they must be kept
sorted, or else running the timer functions and removing the timer
from the list will be much more complex.

Assuming that timers are sorted is not relying on the internals, if
you ask me.

> (why does an "medium" sized modern js web project require 5000 sources
> is the real question we need to ask ourselves)

Indeed.  Any idea of what the answer could be?





  reply	other threads:[~2024-03-11 13:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-18  1:53 bug#69241: [PATCH] Jsonrpc: improve performance of process filter function Daniel Pettersson
2024-02-28 12:22 ` bug#69241: Fixed patch issues Daniel Pettersson
2024-03-09  8:55   ` Eli Zaretskii
2024-03-09  8:56   ` Eli Zaretskii
2024-03-09 10:56     ` João Távora
2024-03-10 14:28       ` Daniel Pettersson
2024-03-10 14:41         ` João Távora
2024-03-11  9:44           ` Daniel Pettersson
2024-03-11 13:11             ` Eli Zaretskii [this message]
2024-03-11 14:48               ` Daniel Pettersson
2024-03-11 16:27                 ` Eli Zaretskii
2024-03-11 19:03                   ` Daniel Pettersson
2024-03-11 19:18                     ` Eli Zaretskii
2024-03-11 19:39                       ` Daniel Pettersson
2024-03-12  3:27                         ` Eli Zaretskii
2024-03-12 13:31                           ` Eli Zaretskii
2024-03-12 14:34                             ` Daniel Pettersson
2024-03-12 15:00                               ` Eli Zaretskii
2024-03-12 13:28                         ` Eli Zaretskii
2024-03-12 14:33                           ` Daniel Pettersson
2024-03-10 16:46         ` Eli Zaretskii
2024-03-10 20:05           ` Daniel Pettersson
2024-03-10 23:30             ` Daniel Pettersson
2024-03-11 12:24             ` Eli Zaretskii
2024-03-11 12:38               ` Daniel Pettersson

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

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

  git send-email \
    --in-reply-to=86edcgvrp1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=69241@debbugs.gnu.org \
    --cc=daniel@dpettersson.net \
    --cc=joaotavora@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.