lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Add scrollbars to input-sequence editor


From: Vadim Zeitlin
Subject: Re: [lmi] Add scrollbars to input-sequence editor
Date: Sun, 3 Apr 2016 18:40:07 +0200

On Mon, 23 Nov 2015 12:12:21 +0000 Greg Chicares <address@hidden> wrote:

GC> BTW, I should have started this discussion on the mailing list; could
GC> you move it their, so this patch (or its successor) is available online
GC> please?

 Hello,

 This patch is now available at https://github.com/vadz/lmi/pull/25 and it
has grown quite a bit since then as, in addition to the main patch changing
the layout of the input sequence entry dialog to use vertical scrollbars if
the sequence is too long to fit on screen otherwise, there are 2 other
changes:

 First, I've added a possibility to open the editor from keyboard, using
Alt-Enter. This was mostly for my personal use, because it made testing the
other changes much, much faster (without speaking of less annoying), but I
think it could be useful for the others as well.

 Second, while working on the main patch I couldn't help noticing how
horrendously slow this dialog was. As explained in the PR, I could bring
down the time needed to open it from ~4s to ~600ms and while the latter is
still noticeably slow, it's much better than the former, so these patches
should really be applied as well IMO. I also tried to optimize things
further and there is definitely scope for more to be done here, e.g.
profiling shows that just the calls to combo->AutoComplete() alone when
inserting a new row take ~150ms. This could be avoided by only calling
AutoComplete() when the combobox gets the focus for the first time, but
it's a relatively messy change and I wanted to ask you if you'd be willing
to accept it first, before doing it. The rest of the time is spent in
actual window moving and resizing and I have a strong suspicion that wxMSW
could be improved here (FWIW while these changes help under wxGTK too,
where they bring the time down to 200ms, it was only 300ms there to begin
with!), but it's not completely trivial, e.g. freezing everything from the
beginning to the end does speed things up, but also results in corrupted
display when the vertical scrollbar appears, so I would need to spend more
time on this to make it really work. As above, please let me know if I can/
should do it.


 Finally, although it is not really related to the main patch (and the two
pull requests are independent, i.e. could be applied in any order), I've
also re-resubmitted https://github.com/vadz/lmi/pull/26 which replaces
overriding EndModal() with overriding TransferDataFromWindow(), as it
affects the same code and I think you might be able to apply it together
with/while testing the other one. But PR 25 is definitely the much more
important one, as it solves a user-visible problem (or even two, if you
consider, as I do, having to wait for several seconds for a dialog to come
up, as a problem).


 As always, please let me know if you have any questions about this and
thanks in advance!
VZ

reply via email to

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