From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Concurrency via isolated process/thread Date: Mon, 24 Jul 2023 21:31:30 +0800 Message-ID: <87bkg11ln1.fsf@yahoo.com> References: <871qhnr4ty.fsf@localhost> <87zg48apwr.fsf@localhost> <83edljg8ub.fsf@gnu.org> <87o7knbxr7.fsf@localhost> <838rbrg4mg.fsf@gnu.org> <87ilavbvdr.fsf@localhost> <834jmffvhy.fsf@gnu.org> <878rbrbmwr.fsf@localhost> <83fs5zecpo.fsf@gnu.org> <87351zbi72.fsf@localhost> <83351yevde.fsf@gnu.org> <87cz12ad2w.fsf@localhost> <83a5w6cwdr.fsf@gnu.org> <87pm518m0g.fsf@localhost> <83o7kl9tyj.fsf@gnu.org> <874jmd89us.fsf@localhost> <878rb53dkj.fsf@localhost> <87wmyp1vr9.fsf@yahoo.com> <875y6939jl.fsf@localhost> <87jzup1p4x.fsf@yahoo.com> <87wmyp1oor.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26641"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 24 15:32:38 2023 Return-path: Envelope-to: ged-emacs-devel@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 1qNvfx-0006hn-Ud for ged-emacs-devel@m.gmane-mx.org; Mon, 24 Jul 2023 15:32:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qNvf6-0005SH-2b; Mon, 24 Jul 2023 09:31:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qNvf4-0005S2-PJ for emacs-devel@gnu.org; Mon, 24 Jul 2023 09:31:42 -0400 Original-Received: from sonic314-20.consmr.mail.ne1.yahoo.com ([66.163.189.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qNvf1-0000Cw-S5 for emacs-devel@gnu.org; Mon, 24 Jul 2023 09:31:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690205498; bh=HRqfFlcr+l1jV7IP4OlZAknUxBMTmZ+GzFMlCstYkz4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=i0aSnE1ydLwtWa43E/LG6uutsUq1FKsDIiKxwrTnVbvNAGo2F7WHN7/0sSBbZyzqgjfTjadZAHxafX8kSOuAtqSPv+gBbG+r2OT5T05VG9fLH5vqrE4Mac0zs+o+ksQPRguy1qsevjHaAuSeFVA2EpektpSFKMOugZ9T7ufHR8NoyzQz/1UdHLvIA0Npn0xTibECoiXtQQq1aInAFDotPF39UOKVf2njuWWI4919rOvO9Sse+x8I9JsgJXg+cWtCxCDa2+GEhwJQ0iLOsVHsPXmfiZe3S4x7/NP11AXGedOHpmtIEdCuxX569ZX7CVlE4zCJGoajBOjv8+CntUFikA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1690205498; bh=pDuJtyQBNlh589H4YKIOv+on9glYovUV6LkTYKTeuUj=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=ZCe+8QYc/JqSvashwb8LPt4SW5E+gd+EMo3wKQHxQyndyksLHcv0lCtkf4vUSFXkKw6oJwHJy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jrl3UTtJSE5Rqt6Xv9qGoqdFUqQ.EBQLj7.F Lwj210_jYmbdynJmX1O8qEnF9L2EXr6Ce8vRQDHVxK X-Sonic-MF: X-Sonic-ID: 9fd93207-8d9a-43e8-b34c-285053def8b0 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Mon, 24 Jul 2023 13:31:38 +0000 Original-Received: by hermes--production-sg3-9dc5f54fc-zbsxq (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 341e6bbc3a3628e8ccb6666ce430c09a; Mon, 24 Jul 2023 13:31:35 +0000 (UTC) In-Reply-To: <87wmyp1oor.fsf@localhost> (Ihor Radchenko's message of "Mon, 24 Jul 2023 12:25:40 +0000") X-Mailer: WebService/1.1.21647 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.189.146; envelope-from=luangruo@yahoo.com; helo=sonic314-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308057 Archived-At: Ihor Radchenko writes: > But editing operations already loop over all the buffer markers. If a > just dozen of extra buffer markers (one for each thread, in the worse > case) are unacceptable, we should really do something about marker > performance. It is unacceptable because it is drastically more expensive than it is today. No degree of optimization to the marker code will eliminate this problem. > Last time I wrote a thread code that had to work with buffer text, I had > to store markers manually anyway. Otherwise, point position were always > chaotic. What happens if another thread deletes the text that surrounds point in the thread your code is running in? Won't you have the same problem then anyhow? > And threads that will not work with buffer text, will only need to store > a single marker. > > So, I do not see how the proposed approach will make things worse > memory-wise. I'm not concerned about the memory consumption. I'm concerned about both the usability aspects of having even more disparate objects hold point positions, and the slowdown.