Re: [PATCH 0/2] ruby: enable garbage collection

2021-05-27 Thread Felipe Contreras
On Sat, May 22, 2021 at 5:49 AM David Bremner  wrote:
>
> Felipe Contreras  writes:
>
> > Ruby is a gc language, we shouldn't be doing workaround to free memory when 
> > Ruby is perfectly
> > capable of doing so.
> >
> > The problem is that talloc wants to be smart, and Ruby and talloc both 
> > fight to free memory. We can
> > let Ruby win by stealing all the objects from talloc control.
> >
> > Thanks to the previous cleanup patches it's now possible to easily do this.
> >
> > In order to test this series I've used the following script:
>
> I still haven't had a chance to look at the series, but how about making
> this script either a test or a performance-test, as appropriate?

I gave this a try, and even compiled Ruby with --with-valgrind
(apparently Arch Linux doesn't do that), but doesn't seem to work
right:

% valgrind /opt/ruby/bin/ruby -e 'p true'

  HEAP SUMMARY:
  in use at exit: 37,193,788 bytes in 21,951 blocks
total heap usage: 61,729 allocs, 39,778 frees, 51,503,615 bytes allocated

  LEAK SUMMARY:
 definitely lost: 510,491 bytes in 4,617 blocks
 indirectly lost: 795,436 bytes in 9,411 blocks
   possibly lost: 2,128,254 bytes in 7,100 blocks
 still reachable: 33,759,607 bytes in 823 blocks
  suppressed: 0 bytes in 0 blocks
  Rerun with --leak-check=full to see details of leaked memory

Trying to run the simplest of Ruby commands throws a log 93,000 lines long.

I did try to search online resources to use valgrind with Ruby to no
avail. Apparently everyone is using valgrind with a baseline (if
valgrind shows 500 KiB lost as a start, how much does it change after
my changes?). Sure, we could try to massage a valgrind suppression
file, but is it worth the effort if the Ruby project itself hasn't
even tried to do that?

If we wanted to measure the memory performance of such a command
(which I think would be very nice) a different strategy is needed.

I also didn't see any talloc output.

For now I don't think the series should be blocked by this setback.

Just try to run the command yourself with top. You can see it works.

Cheers.

-- 
Felipe Contreras
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: [PATCH] NEWS/emacs: document changes in 0.32 that affect keybindings.

2021-05-27 Thread Daniel Kahn Gillmor
On Thu 2021-05-27 20:11:13 +0300, Tomi Ollila wrote:
> On Thu, May 27 2021, Daniel Kahn Gillmor wrote:
>> +Keymaps are no longer fset, which means they need to be referred to in
>> +define-key directly (without quotes).  If your ~/.emacs has a
>
> In our docs it would be better to refer ~/.emacs.d/notmuch-config.el (?) :D

Interesting, that's not where my notmuch-emacs config is located but i
certainly have no objection to the proposed revision.

  --dkg


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: [PATCH] NEWS/emacs: document changes in 0.32 that affect keybindings.

2021-05-27 Thread Tomi Ollila
On Thu, May 27 2021, Daniel Kahn Gillmor wrote:

> See list discussion in thread starting with
> id:87h7ip2baq@fifthhorseman.net for more details.
>
> Signed-off-by: Daniel Kahn Gillmor 
> ---
>  NEWS | 7 +++
>  1 file changed, 7 insertions(+)
>
> diff --git a/NEWS b/NEWS
> index c0ae6afe..c3ca1085 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -101,6 +101,13 @@ Removed, inlined or renamed functions and variables:
>  `notmuch-sexp-eof`, `notmuch-split-content-type`, and
>  `notmuch-tree-button-activate`.
>  
> +Keymaps are no longer fset, which means they need to be referred to in
> +define-key directly (without quotes).  If your ~/.emacs has a

In our docs it would be better to refer ~/.emacs.d/notmuch-config.el (?) :D

Tomi


> +keybinding like:
> +   (define-key 'notmuch-show-mode-map "7" 'foo)
> +you should change it to:
> +   (define-key notmuch-show-mode-map "7" 'foo)
> +
>  Notmuch 0.31.4 (2021-02-18)
>  ===
>  
> -- 
> 2.30.2
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[PATCH] NEWS/emacs: document changes in 0.32 that affect keybindings.

2021-05-27 Thread Daniel Kahn Gillmor
See list discussion in thread starting with
id:87h7ip2baq@fifthhorseman.net for more details.

Signed-off-by: Daniel Kahn Gillmor 
---
 NEWS | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/NEWS b/NEWS
index c0ae6afe..c3ca1085 100644
--- a/NEWS
+++ b/NEWS
@@ -101,6 +101,13 @@ Removed, inlined or renamed functions and variables:
 `notmuch-sexp-eof`, `notmuch-split-content-type`, and
 `notmuch-tree-button-activate`.
 
+Keymaps are no longer fset, which means they need to be referred to in
+define-key directly (without quotes).  If your ~/.emacs has a
+keybinding like:
+   (define-key 'notmuch-show-mode-map "7" 'foo)
+you should change it to:
+   (define-key notmuch-show-mode-map "7" 'foo)
+
 Notmuch 0.31.4 (2021-02-18)
 ===
 
-- 
2.30.2
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: (wrong-type-argument keymapp notmuch-show-mode-map) in emacs on upgrade to notmuch from master

2021-05-27 Thread David Bremner
Daniel Kahn Gillmor  writes:

> If we don't want to go through the full hassle of deprecation and delay
> before final removal, it seems like a mention in NEWS is at least
> worthwhile.
>

Since the change is released, it's a bit late to uh, not release it ;).
No objection to adding to NEWS retroactively.

d
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: (wrong-type-argument keymapp notmuch-show-mode-map) in emacs on upgrade to notmuch from master

2021-05-27 Thread Daniel Kahn Gillmor
On Wed 2021-05-26 23:34:47 -0400, Kyle Meyer wrote:
> Daniel Kahn Gillmor writes:
>
>> I worry that this is due to one of the two following commits but my
>> elisp-foo is weak enough that i don't know what the right next steps are:
>
> It's due to the second commit, 05a436f7 (emacs: don't fset keymaps,
> 2020-11-11).  You could avoid the error by dropping the quote from the
> keymap variable, changing
>
>   (define-key 'notmuch-show-mode-map "j" 'dkg-notmuch-show-handle-junk)
>
> to
>
>   (define-key notmuch-show-mode-map "j" 'dkg-notmuch-show-handle-junk)

Thanks, this does resolve the issue for me.  I see the patch was
discussed briefly on-list back in November before being merged.

I wonder how many other users will have this problem when upgrading, i
don't know how widespread the use of the quoted variables are in
~/.emacs.  In some sense their removal is a change to the elisp API :/

The conservative API designer in me suggests that rather than removing
these elements directly, we should deprecate first, warning if people
use them (and those warnings should include guidance on how to avoid the
warnings).  Then, after sufficient time has passed, drop the deprecated
element.

This isn't important for me anymore (the issue is resolved for me,
thanks Kyle!), but maybe it will be for others?

If we don't want to go through the full hassle of deprecation and delay
before final removal, it seems like a mention in NEWS is at least
worthwhile.

Regards,

--dkg


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org