emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/3] Add gc-estimated-time variable


From: Eli Zaretskii
Subject: Re: [PATCH v2 1/3] Add gc-estimated-time variable
Date: Sun, 22 Nov 2020 20:10:08 +0200

> From: Spencer Baugh <sbaugh@catern.com>
> Cc: Spencer Baugh <sbaugh@catern.com>,
>       Eli Zaretskii <eliz@gnu.org>
> Date: Sun, 22 Nov 2020 00:08:27 -0500
> 
> +        /* Decay very fast, since heap size can change rapidly. */
> +        gc_time_ema = 0.5 * gc_time_ema + 0.5 * timespectod 
> (this_gc_elapsed);
> +      Vgc_estimated_time = make_float (gc_time_ema);

> +  DEFVAR_LISP ("gc-estimated-time", Vgc_estimated_time,
> +            doc: /* An estimate of the time required for the next garbage 
> collection.

I guess "Estimated time before next garbage collection" is somewhat
clearer, since "required" in this context might be confusing?

> +The time is in seconds as a floating point value.
> +This is calculated as an exponential moving average of the time
> +required for previous garbage collections.  */);

I don't think the last sentence should be in the doc string.  it
doesn't add anything useful, and the source code is available.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]