From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: master c59e878: Inhibit modification hooks when saving eieio-persistent's Date: Mon, 04 May 2020 14:09:39 -0700 Message-ID: <87368fxv8s.fsf@ericabrahamsen.net> References: <20200501192115.23847.67499@vcs0.savannah.gnu.org> <20200501192116.A55EE20B5B@vcs0.savannah.gnu.org> <87368jba7f.fsf@web.de> <87y2qb9tv3.fsf@web.de> <87tv0z9qt2.fsf@web.de> <87bln611vs.fsf@web.de> <87a72p7n4v.fsf@web.de> <87v9ldfvn5.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="22678"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 04 23:10:30 2020 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 1jViMA-0005me-SQ for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 23:10:30 +0200 Original-Received: from localhost ([::1]:52342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jViM9-0002nj-UY for ged-emacs-devel@m.gmane-mx.org; Mon, 04 May 2020 17:10:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jViLW-0002MF-7N for emacs-devel@gnu.org; Mon, 04 May 2020 17:09:50 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:51360 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jViLV-0006Zi-52 for emacs-devel@gnu.org; Mon, 04 May 2020 17:09:49 -0400 Original-Received: from localhost (75-172-112-137.tukw.qwest.net [75.172.112.137]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id C4E95FA0E2; Mon, 4 May 2020 21:09:40 +0000 (UTC) In-Reply-To: <87v9ldfvn5.fsf@web.de> (Michael Heerdegen's message of "Sun, 03 May 2020 07:13:50 +0200") Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/04 17:09:41 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:248910 Archived-At: Michael Heerdegen writes: > Stefan Monnier writes: > >> > After having identified the culprits in my case - all of them can be >> > fixed - there is not much speedup left from this particular change. >> > Given that, but also given that we don't know what other people might >> > have added there - do you think that using `combine-change-calls' in >> > this case is justified, Stefan? >> >> I hope not ;-) > > Then Eric I think it's your turn now to check (profile) if this is at > all helpful in your case. Could you please try that? Okay, I started with the existing `inhibit-modification-hooks' edit. Saving both the gnus registry (not many objects but they're pretty large; file is 30M) and one of my EBDB databases (many objects but they're quite small; file is 550K). Basically just loaded both objects into a variable, and then repeatedly saved the object with `eieio-persistent-save'. ;; With modification hooks uninhibited (ie, reverting Michael's commit). (benchmark-run 100 (my-save-registry)) -> (1028.64836554 2801 537.1068782020001) (benchmark-run 100 (my-save-ebdb)) -> (51.585404029 134 20.779424303000003) ;; With modification hooks inhibited (Emacs master). (benchmark-run 100 (my-save-registry)) -> (989.206686569 2800 526.325465032) (benchmark-run 100 (my-save-ebdb)) -> (63.946958194 127 23.392065172000002) I haven't tried it with `combine-change-calls' or any of the other speedups (gc-cons-threshold, etc), mostly because I've also been trying to get work done. But I can test with any combination of changes, as needed. Eric