From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: persistent data feature Date: Sun, 12 Dec 2021 11:48:02 +0800 Message-ID: <87bl1miivh.fsf@localhost> References: <87tufmjyai.fsf@gnus.org> <877dcil2sj.fsf@ericabrahamsen.net> <87czm98qi1.fsf@gnu.org> <87o85tcwm0.fsf@ericabrahamsen.net> <874k7ljwkr.fsf@gnus.org> <87fsr5cuzq.fsf@ericabrahamsen.net> <878rwx8mdn.fsf@gnu.org> <87r1aphuei.fsf@gnus.org> <837dcex6ub.fsf@gnu.org> <87bl1p10js.fsf@gnus.org> <87bl1olyhr.fsf@localhost> <492F4AC1-2230-4D4C-9D8E-19659FBFB50B@mit.edu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32020"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "rms@gnu.org" , Eric Abrahamsen , cesar mena , "emacs-devel@gnu.org" , Stefan Monnier , Pip Cet , "larsi@gnus.org" , Eli Zaretskii To: Qiantan Hong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 12 04:47:26 2021 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 1mwFpd-0008Ar-QR for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Dec 2021 04:47:25 +0100 Original-Received: from localhost ([::1]:59526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwFpb-0001R3-K4 for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Dec 2021 22:47:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwFox-0000kh-5f for emacs-devel@gnu.org; Sat, 11 Dec 2021 22:46:43 -0500 Original-Received: from [2a00:1450:4864:20::12c] (port=33360 helo=mail-lf1-x12c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwFov-0003KS-GU; Sat, 11 Dec 2021 22:46:42 -0500 Original-Received: by mail-lf1-x12c.google.com with SMTP id bu18so25101431lfb.0; Sat, 11 Dec 2021 19:46:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=tH7yTGRThiAfm6Kb8RMwdWadcGjrOVPyO5a8S1/UxG8=; b=V2wg5oGdgJoYMS92AY1Lx/KDLhEWFC5zibQok6SXNoTYZQIGQSHzmJ1PHvVOW2+WRT uyj2/Uor/IPKGSBI/oXTFYsMwb4NtA9sJrRHLWvoyLi0cmt20wvRsGll/0OayrkyeY5E TPQNwN46rSjhEHns0GRzbQgzMGncIDTRPovWmmlsU0IuF+OVXCOHkknxuBqeU64SMGGS bI5qTr+Zt5i61OCagIb08CQTEv22KywaTEkSWJmWNhQADX55hZlsBxxHGzCw+XJnjyAx JB1b5h72l0HiMsEQhvM+2sz8gRW9r1QQSLv+JWbIKKSi/CHJwgm2bnbDrDpjDDW52+b4 VIlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=tH7yTGRThiAfm6Kb8RMwdWadcGjrOVPyO5a8S1/UxG8=; b=dOJ0OQ355gFgc0A+mVzSaDXJgYhS5aS/vvF69hBOeAoSP3ULCu04jptETknxCGvFef PplaXWLwbHJBR+VdUs+GpB0GNaUEsb5ZVj/Yi40FQDK8j82d8ts7KkrBNsou+5YNZVYq hyfeDh72SrDdzVR+xH9GOE7nQgDO7xIWEIqIBuE83FWiZVrt3IZgI9VC2fi4LTC+TVFe vzQ7oTonLKOh5DAzreKXj1nMf/MOUKcuaYrbO0/kVfKar7aLZOjQs0S1hm0vj/7Jsv/p gotdcMXF5RjIflu3uAjLglRtTQuwwfgY0EegKL/iD7ZxsEdpwE2Kx351ROUdnHixR/yc 8FzQ== X-Gm-Message-State: AOAM531pl30YlnFnPU65tNcA+Mpui7NJPQB6E6hPLUWNTHBdjfLAOjjK bhZlfofnmkaIfeZoMrk/udg= X-Google-Smtp-Source: ABdhPJxLaAlLU+v3gTycTFOeZDOGQkCi7xv4JQp14mn8+VtTklj4R25pL23obnr/w94zlDfYLX5iXw== X-Received: by 2002:a19:6717:: with SMTP id b23mr21307187lfc.659.1639280798596; Sat, 11 Dec 2021 19:46:38 -0800 (PST) Original-Received: from localhost ([91.210.107.150]) by smtp.gmail.com with ESMTPSA id l18sm865901lfc.97.2021.12.11.19.46.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Dec 2021 19:46:38 -0800 (PST) In-Reply-To: <492F4AC1-2230-4D4C-9D8E-19659FBFB50B@mit.edu> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::12c (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=yantar92@gmail.com; helo=mail-lf1-x12c.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" Xref: news.gmane.io gmane.emacs.devel:281727 Archived-At: Qiantan Hong writes: > I think a good fit to that would be incremental image. Note that not all data can be saved incrementally. Org mode's cache is currently using AVL-tree with extra links between nodes - it is a full-scale circular object. I am not sure if there is a universal way to store and update such data incrementally. > Is it possible to have Emacs save/load part of the heap > (e.g. reachable from a root object) quickly, potentially > by directly mapping the memory in the load case? > Is pdumper useful for that purpose? Anything that speeds up read/write would be helpful. From my experience, reading large cache data for org-persist takes 2-3 seconds (though it is still 2-3x faster compared to re-building cache from scratch). Best, Ihor