all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Daniel Pettersson <daniel@dpettersson.net>
Cc: 69241@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#69241: Fixed patch issues
Date: Sun, 10 Mar 2024 14:41:07 +0000	[thread overview]
Message-ID: <CALDnm52pPeqdsUp9YzZkbLyrPw3yTfxNN0kHYzuBVNSzi3xEQA@mail.gmail.com> (raw)
In-Reply-To: <m2bk7mjh4q.fsf@dpettersson.net>

On Sun, Mar 10, 2024 at 2:28 PM Daniel Pettersson
<daniel@dpettersson.net> wrote:

> As I have previously stated I am willing to take on the maintainer role
> for Jsonrpc.

Thank you Daniel.  It'll be in very good hands.

> > +           ;; `timer-activate' orders timers by time, which is an
> > +           ;; very expensive operation when jsonrpc-mqueue is large,
> > +           ;; therefore the time object is reused for each timer
> > +           ;; created.
>
> I am interested in what both of you think about relying on undocumented
> behavior.
>
> To grasp the scope of this issue, an adapter server sent 50 000
> messages. With `read-process-output-max' set to the platforms max, each
> of those messages where placed on `timer-list' in the same call to
> jsonrpc's filter function, which then had to be sorted as O(N^2)
> (calls to timer--time-less-p).
>
> Which makes Jsonrpc unusable for that particular server.

I think your analysis is sound, Daniel. As you have noticed the run-at-time 0
is not to actually  use a timer, but just to get a call that is independent
from the current  call stack which may be nested because of the use case
of bug#67945.

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

Finally 50.000 is a gigantic amount -- are all of these essential?  Can't the
server coalesce this data into fewer messages within the DAP protocol?

João





  reply	other threads:[~2024-03-10 14:41 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 [this message]
2024-03-11  9:44           ` Daniel Pettersson
2024-03-11 13:11             ` Eli Zaretskii
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=CALDnm52pPeqdsUp9YzZkbLyrPw3yTfxNN0kHYzuBVNSzi3xEQA@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=69241@debbugs.gnu.org \
    --cc=daniel@dpettersson.net \
    --cc=eliz@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 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.