From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Newsgroups: gmane.emacs.bugs Subject: bug#41242: Port feature/native-comp to Windows - Improve handling of native compilation... Date: Sun, 24 May 2020 14:58:15 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000c5cb305a6689c45" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="87437"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41242@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 24 19:59:10 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 1jcutx-000MfX-OP for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 May 2020 19:59:09 +0200 Original-Received: from localhost ([::1]:40354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcutw-0001Yb-O5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 May 2020 13:59:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcutq-0001YT-LC for bug-gnu-emacs@gnu.org; Sun, 24 May 2020 13:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcutq-0001LY-BR for bug-gnu-emacs@gnu.org; Sun, 24 May 2020 13:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jcutq-0006WC-Bb for bug-gnu-emacs@gnu.org; Sun, 24 May 2020 13:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 May 2020 17:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41242 X-GNU-PR-Package: emacs Original-Received: via spool by 41242-submit@debbugs.gnu.org id=B41242.159034311625021 (code B ref 41242); Sun, 24 May 2020 17:59:02 +0000 Original-Received: (at 41242) by debbugs.gnu.org; 24 May 2020 17:58:36 +0000 Original-Received: from localhost ([127.0.0.1]:38646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcutQ-0006VV-4I for submit@debbugs.gnu.org; Sun, 24 May 2020 13:58:36 -0400 Original-Received: from mail-oo1-f47.google.com ([209.85.161.47]:46173) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcutO-0006VI-BG for 41242@debbugs.gnu.org; Sun, 24 May 2020 13:58:34 -0400 Original-Received: by mail-oo1-f47.google.com with SMTP id g22so3195869oop.13 for <41242@debbugs.gnu.org>; Sun, 24 May 2020 10:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H7uiPUwJp50TOV3Qxma72aHv9w1GzVV4NsYHB92gG1E=; b=CqTdOKUolbGOC124g97Vdu0qWoiW5wzGbjqDcIhkgCXLIXdX5TWBw8f6l1cXo1qLl+ 5FZlhanaAzdDPTfGzuxSD98Bfq9i+drDw9Lry0fglkVzNPBn2UZROuZ3YT1A0JVr8QUW FP2bRY8KLABYFWKDyxsHS4wpcxXjPIRufd7Si6ZvxOl9lk+ih0dhP+B2OjkraxQLd24b iODKmFdOrMjDEpbfFsZg0QzVcueA9uRDmtqG/lZvCNrorF+XyhvOD5VVjaSwwWN41d5I zYRXDINk5YHXPt5hfDGjqSGNGc/FYDfUtMerZ3WtEQICIH0dyDaK097x28fcZjW+kF3g bbtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H7uiPUwJp50TOV3Qxma72aHv9w1GzVV4NsYHB92gG1E=; b=pQN/bezEoamKVkNSntl9d+QNPgBE/rlhVXE4ulvwXqORfrMDWgdIxLJuJPDOE4FKer WstVscTOwQv0/uvn+Mb6qMOH4tU1nzexD7l+uAwiOd7tJN+nNZ1Yz/zZTxmm4Go99qlr 5btSWwKSwytBOP7q3aefLWA6HjlIp2eGiYAZJhKU9tOq2t3ct6k4A8TXI3vBYokBs5ys IwsOEkhqHAwBRIgOjn6flQwhDcObnaryIOV+I2DG5LJGkOlbIMX+JpCjycvDZb45teZz zYWXO8BJTnniGMGdET9opGlYS719ck4rz0FKdVeoZQMX/VIXxSiNwWmGtS7nuoXUnI6P ySeg== X-Gm-Message-State: AOAM53355pdVe0hedp9P/bzbK5VHdymD2RUCahOgnO0RrnrbdG55dIx4 05rjDz3AByf18hx69f/6uodEZ7ehLSDxuiLIP0U= X-Google-Smtp-Source: ABdhPJydYVcYK8YBWBgQKKMRdxNxyFQjN7R05AmsCiKA02Kx8i9EUfNlreh/t1/ACgJgY/kXDq32OM74n9jhAb8agcQ= X-Received: by 2002:a4a:ad0d:: with SMTP id r13mr10693053oon.22.1590343108417; Sun, 24 May 2020 10:58:28 -0700 (PDT) In-Reply-To: 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:180915 Archived-At: --0000000000000c5cb305a6689c45 Content-Type: text/plain; charset="UTF-8" > The problem is that GC is called (especially by default) *very* > frequently, bounding GC performance to filesystem accesses is really not > a good idea IMO because we have no control over this last. > > You could not see a difference here because: > > - spaceemacs GC settings runs it way less often coming with a bigger > gc-cons-threshold by default > > - GC euristincs being GC slow decides to give-up a little and accept > running less often leading to more fragmentation > > - filesystem is blazingly fast > > - you haven't measured ;) Actually unloading a native compilation unit is such an unfrequent operation that all that finish_delayed_disposal_of_comp_units() does is compare a pointer to NULL. It will not slowdown the GC at all. Anyway, I could change this to run on an idle timer or just handle it when Emacs closes. Which do you prefer? > So the reason is not to allocate lisp objs during GC correct? Correct. Nicolas --0000000000000c5cb305a6689c45 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> The problem is that GC is called (es= pecially by default) *very*
> frequently, bounding GC performance to = filesystem accesses is really not
> a good idea IMO because we have n= o control over this last.
>
> You could not see a difference he= re because:
>
> - spaceemacs GC settings runs it way less often= coming with a bigger
> =C2=A0 gc-cons-threshold by default
>> - GC euristincs being GC slow decides to give-up a little and accept=
> =C2=A0 running less often leading to more fragmentation
>> - filesystem is blazingly fast
>
> - you haven't meas= ured ;)

Actually unloading a native compilation unit is such an unfr= equent operation
that all that finish_delayed_disposal_of_comp_units() d= oes is compare a pointer
to NULL. It will not slowdown the GC at all.
Anyway, I could change this to run on an idle timer or just handle it = when Emacs
closes. Which do you prefer?

> So the reason is not= to allocate lisp objs during GC correct?

Correct.

Nicolas
--0000000000000c5cb305a6689c45--