[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 40c0124816: Minor improvements to precision scroll interpolat
From: |
Stefan Monnier |
Subject: |
Re: master 40c0124816: Minor improvements to precision scroll interpolation |
Date: |
Sat, 30 Jul 2022 03:27:44 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>> --- a/lisp/pixel-scroll.el
>> +++ b/lisp/pixel-scroll.el
>> @@ -759,6 +759,9 @@ It is a vector of the form [ VELOCITY TIME SIGN ]."
>> (interactive "e")
>> (when pixel-scroll-precision-use-momentum
>> (let ((window (mwheel-event-window event))
>> + ;; The animations are smoother if the GC threshold is
>> + ;; reduced for the duration of the animation.
>> + (gc-cons-threshold (* gc-cons-threshold 3))
>> (state nil))
>
> I don't think it is safe to multiply gc-cons-threshold without some
> kind of limitation from above: the user or some Lisp program could
> have increased the threshold already to a large value.
And I also suspect the above won't be "sufficient" when the heap is
large, because in that case `gc-cons-threshold` doesn't have any effect
any more and it's `gc-cons-percentage` that matters instead.
Maybe binding `gc-cons-percentage` to something like the 1.0 value we
now use in batch mode (or rather to (max 1.0 gc-cons-percentage)) would
be a better option.
Stefan