[patch] Selection stats in statusbar
Scott Kostyshak
skostysh at lyx.org
Thu Aug 18 12:00:33 UTC 2022
On Thu, Aug 18, 2022 at 11:44:49AM +0200, Jürgen Spitzmüller wrote:
> Am Donnerstag, dem 18.08.2022 um 11:31 +0200 schrieb Daniel:
> > This shouldn't be an issue. The idea is that statistics are only
> > generated after some time has passed without interruption. They are
> > not
> > shown immediately. Hence, continuous arrow key movement would not
> > trigger statistics at all. (Same for continuous typing which is an
> > advantage to the current implementation which continuously triggers
> > statistics.)
>
> It _is_ an issue if you blindly call functions if not needed, even if
> they exit early. This is really not better than the current timer-based
> approach.
>
> Statistics should only be called when needed.
I agree. Even if the hit doesn't show up in noticeable lag, or even in
profiling, it does not seem like clean coding and I don't have any
intuition for what could change down the road (e.g., maybe we increase
the use of showMessage() by an order of magnitude for some other
purpose).
Maybe for a bug fix, things like this can be acceptable, but for a
feature we try to keep the bar high (although of course there are
exceptions).
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20220818/fdf06516/attachment-0001.asc>
More information about the lyx-devel
mailing list