lmi
[Top][All Lists]
Advanced

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

[lmi] PATCH: optimization of view updates in MvcController


From: Vadim Zeitlin
Subject: [lmi] PATCH: optimization of view updates in MvcController
Date: Thu, 6 Jun 2019 22:55:01 +0200

 Hello,

 Recent (private) discussions about MvcController reminded me that I never
asked you to apply the simple patch from

        https://github.com/vadz/lmi/pull/105

which results in big speedup of ConditionallyEnableItems() which is called
from every wxEVT_UPDATE_UI event and so is quite performance-critical. How
big exactly? Benchmarks show that average time of its execution goes down
from 13.1ms to 0.19ms after the first commit, adding the cache for the
items of wxItemContainers, and further down to 0.08ms after the second
commit optimizing the unnecessary calls to SetStringSelection(), i.e. a
~160x speedup which is really not bad for such a relatively simple patch.
If you'd like to redo the benchmarks, you can use the patch from

https://github.com/thesiv/lmi/commit/a17d96148ed280d3556e15ac8cb8f086451c9f19

(linked from the PR description). Other than that I don't really have any
comments about the changes, I hope they should be self-explanatory, but
please let me know if you have any questions about them, of course.

 This PR is not really critical, but it should result in user-visible
improvement in behaviour and, even though there are no unit tests covering
this code, I'm relatively confident that it can't break anything. It would
also be better to apply it before doing any other changes in this code, in
case we decide to change it as discussed elsewhere, to avoid the chance of
getting conflicts later.

 Thanks in advance for looking at it!
VZ

Attachment: pgpejnnHTQitz.pgp
Description: PGP signature


reply via email to

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