From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#50777: Dropping EIEIO from xref (for performance) Date: Fri, 24 Sep 2021 18:32:39 +0300 Message-ID: References: <6b5b14d5-b2ca-8add-f4bf-a3405270c07a@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1561"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 50777@debbugs.gnu.org, Daniel =?UTF-8?Q?Mart=C3=ADn?= To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 24 17:34:27 2021 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 1mTnDX-0000Go-4n for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 17:34:27 +0200 Original-Received: from localhost ([::1]:59988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTnDW-000568-3v for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 11:34:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60532) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTnCA-00039k-5l for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 11:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTnC9-0004Nq-UF for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 11:33:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTnC9-0003B8-RY for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 11:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Sep 2021 15:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50777 X-GNU-PR-Package: emacs Original-Received: via spool by 50777-submit@debbugs.gnu.org id=B50777.163249757012195 (code B ref 50777); Fri, 24 Sep 2021 15:33:01 +0000 Original-Received: (at 50777) by debbugs.gnu.org; 24 Sep 2021 15:32:50 +0000 Original-Received: from localhost ([127.0.0.1]:59070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTnBy-0003Ad-6D for submit@debbugs.gnu.org; Fri, 24 Sep 2021 11:32:50 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:35593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTnBw-0003AM-6y for 50777@debbugs.gnu.org; Fri, 24 Sep 2021 11:32:48 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id i23so28774958wrb.2 for <50777@debbugs.gnu.org>; Fri, 24 Sep 2021 08:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+LMMsF766wc1kJcrAXWU+VV+MdNHK4StNTVzpPRcR+w=; b=bMmPOqaDb/6jHNIVA17K4bbWafvnKjTKh3QMwjjqaypL2Xd2RFMV8lmzlsOZ6QtxJo JMUnyRgJ4jJkIsZz2t+iK3RcMnFC2AcVC/vZkq+/1cgX+pLhPxIrWdBp0xL9M5dJLVvO oabtr/rsztLuHORMpK3kT2LSVCB0LtXdc/r3eMnE+mNHSAYQ5UeEo9KJNjJRucbOi3N6 PHOGdTlenxXq7KxJGDv1NYEAKtcZ4p73SRWF23fq8DtuGwLflRsvBFnnpDOuebx+DcbC fcrFPjZ1qWbbSJ4KFJJXYkc+H7/vGX8vhCubB5IHuslXKtc6zpgs/6dj6wZkJO2nR83O 1BeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+LMMsF766wc1kJcrAXWU+VV+MdNHK4StNTVzpPRcR+w=; b=g2keoNY2Cm/cHkjso4tiyYb82BMGzMLtrKz3ksfKzNUGjqjhrYV2p1sTq5MuA7o0St 9G7b062kN7L0DU+2PbBJo9GZprNhW7i9Pm79sgtnICJhfHG1FaWV5SAz+q7rI3A78ONa oN8u7mvQQVIinjG2C02kGL5oSsgXYOjCr0ysAPIyNlBU7ElXuh2LeuhY1vbEElpTYKGt yUtFHjbiGXJTquMjDtGSr+hf/3kTFfBgtMjpm1q0pfUBXceD4icKB3XRj1ldkvdcyIq/ cvkjPM4jC8W5eWp2ssvPNJvJXTUfcilBC3jSMMYwaLGhdnJSJw6C5/OE4R19EkIV1/X5 bu/A== X-Gm-Message-State: AOAM531uyFiY6SZ/scifSpuZ2G9H6NczBf0rp2wWHFDBPRSYpHX2B6TC MIeSj7bTy/5m+8lwUUZt+RE= X-Google-Smtp-Source: ABdhPJxA+F8FJ8bV5t6TX/Sa6y7aYYFDC53YvtasbDv5h6JzmaQPYfoi+YByn+/AbqQz1wYTqOySVA== X-Received: by 2002:a1c:f002:: with SMTP id a2mr2706389wmb.79.1632497562313; Fri, 24 Sep 2021 08:32:42 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id m4sm12982253wml.28.2021.09.24.08.32.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Sep 2021 08:32:41 -0700 (PDT) In-Reply-To: Content-Language: en-US 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:215316 Archived-At: On 24.09.2021 17:49, Stefan Monnier wrote: >> That creates some incompatibility (third-party packages can't inherit from >> 'xref-location' anymore, or use 'make-instance', 'oref' or 'with-slots' with >> our values), > > About that: it should be fairly easy to get `make-instance`, `oref`, and > `with-slots` to work with cl-defstruct objects/classes. > > This should be easy enough that we *could* potentially consider doing > those changes "right away" (i.e. for Emacs-28). Interesting point. Not sure we really want to: I imagine the removal of the use of 'make-instance' contributed to the overall performance improvement. If I'm right, discouraging of its use (for this particular purpose) in third-party code seems like a good idea. > As for the inheritance, they can still inherit from `xref-location` but: > - not with `defclass` (the subclass needs to be defined with `cl-defstruct` > instead). > - they can't inherit from both `xref-location` and something else any more. There is no 'xref-location' structure, it's only defined by generic functions. I think that's better. 'xref-location' has always been a class with empty definition. One area of bigger concern is whether code compiled against the new version of Xref would work with the old one without recompiling (and vice versa). I guess for that to work we need to disable inlining on xref-item's accessors, at least. Maybe there's something else I'm missing.