From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#42028: [Feature Request] 27.0.91; Provide the ability dynamic modules to post events in emacs event loop Date: Wed, 24 Jun 2020 20:07:50 +0300 Message-ID: <83zh8ss87t.fsf@gnu.org> References: <875zbh0wbf.fsf@gmail.com> <83bll8ttet.fsf@gnu.org> <83366ktol5.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="92729"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42028@debbugs.gnu.org To: yyoncho Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 24 19:19:38 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jo93i-000O1k-F7 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Jun 2020 19:19:38 +0200 Original-Received: from localhost ([::1]:56282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo93h-0004Pm-Dg for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Jun 2020 13:19:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jo8tS-0004pl-Tm for bug-gnu-emacs@gnu.org; Wed, 24 Jun 2020 13:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jo8tS-0007xz-Jq for bug-gnu-emacs@gnu.org; Wed, 24 Jun 2020 13:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jo8tS-0008Ks-BI for bug-gnu-emacs@gnu.org; Wed, 24 Jun 2020 13:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Jun 2020 17:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42028 X-GNU-PR-Package: emacs Original-Received: via spool by 42028-submit@debbugs.gnu.org id=B42028.159301850531993 (code B ref 42028); Wed, 24 Jun 2020 17:09:02 +0000 Original-Received: (at 42028) by debbugs.gnu.org; 24 Jun 2020 17:08:25 +0000 Original-Received: from localhost ([127.0.0.1]:38799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo8sq-0008Jw-Sm for submit@debbugs.gnu.org; Wed, 24 Jun 2020 13:08:25 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo8sm-0008Jh-1n for 42028@debbugs.gnu.org; Wed, 24 Jun 2020 13:08:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52740) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo8sg-0007eS-Rk; Wed, 24 Jun 2020 13:08:14 -0400 Original-Received: from [176.228.60.248] (port=3329 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jo8sZ-0004gQ-8y; Wed, 24 Jun 2020 13:08:14 -0400 In-Reply-To: (message from yyoncho on Wed, 24 Jun 2020 19:46:56 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182347 Archived-At: > From: yyoncho > Date: Wed, 24 Jun 2020 19:46:56 +0300 > Cc: 42028@debbugs.gnu.org > > 1. JSON parsing to Jansson data structures > 2. Converting Jasson data structures to lisp data structures. > > If we assume that 1 is taking most of the time Does it? Did someone time these separately? > start(string, callback) -> convert string to char* -> post it to worker thread -> worker thread does the parsing > -> worker thread post to main loop -> main loop converts Jansson ds to lisp ds -> main loop > calls the callback passed on start You cannot easily post to the queue from a worker thread, because the queue cannot be posted to asynchronously. And I lack the larger picture: how would this work within a framework of some Emacs feature? E.g., how will this processed be triggered, and by what kind of trigger? > The same strategy probably could be applied to Font locking with TreeSitter. Again, I don't see the wider picture. Are you familiar with how the current JIT font-lock works? If so, can you explain which parts of that will be replaced/modified, and how?