The Wheel of Time turns… meaning that the Kate Project has quite along history by now. The Kate Project was started back in December 2000, so it’s almost 10 years old. Development sometimes continues with a fast pace; and at other times there is almost no progress for weeks. But all in all, looking back at those 10 years, we can proudly tell you that the project is very much alive. Let’s take a look at the traffic of our mailing list:
The traffic itself does not say much about the development. It probably tells us that there are quite a lot of people using Kate and reporting wishes and bugs. This is a good thing The commit statistics for Kate, KWrite and the KTextEditor interfaces look like this:
Before 2000, Kate did not exist yet. Instead, so these commits come from the KWrite days. The commit rate is quite constant according to this statistic. In fact, there usually are always several developers working on Kate. Some only for a short period to implement single features or fix some bugs, and some long-term contributors. A very nice trend is given by the fact that the core team of Kate grew from about 4 to 7 developers over the last two years. So the Kate Project is very healthy – nice! And of course we are happy for every single contribution. So if you want to get involved in Kate development, join us!
As with any new code, during adoption bottlenecks show up.
For example the rendering of text lines with many ranges inside was quiet slow. This is now partly addressed by Milian Wolff, thanks a lot.
An other bottleneck was the assumption, that it is fast enough to hash the ranges just by their block and iterate over all of them to search the ranges matching a specific line. This does scale well enough for KatePart itself, but KDevelop creates multi-thousand ranges for small documents. To improve this, an internal special mapping was implemented by David Nolden for ranges which don’t span more than one line. For them an efficient line => range mapping is easy and not to costly.
If both changes are tested a bit more, they can be backported in time for KDE 4.5, which will allow a good usability of KatePart for KDevelop once again after the rewrite, given other bugs are fixed.
Dominik already blogged about the issues we have in KatePart with the current SmartRange/SmartCursor/Smart* interfaces that were designed during the early KDE 4.0 release.
Given that large amounts of the internal implementation are exposed to the outside in the interfaces, there was no feasible way to fix the issues with them. The problem with the not thread-safe behaviour could have been prevented by just stating the plain fact that multi-threaded access to the ranges doesn’t work, even thought there is a mutex in the interface exposed which should be locked to gain this safety. Still the real problems of the unchangable bad implemenation and design choices would have remained.
Given the fact, that the SmartInterface is an additional interface for a KTextEditor component and no component is required to implement it, we went the way to create a new redesigned additional interface, the MovingInterface.
In short: it is a stripped down version of the SmartInterface, which tries to avoid to expose any implementation details and is focused on provide the features actually used by other applications like KDevelop and have them working correct instead of providing just a mass of features, which doesn’t work at all in all corner cases.
For KDE 4.5, to not just break all applications which rely on the SmartInterface be implemented in KatePart, both interfaces will be implemented there.
As the SmartRange stuff somehow slipped into the CodeCompletionModelControllerInterface, we will provide a new version of this interface, too, version 3, subsuming 1 + 2, but without SmartRanges inside.
For KDE 4.6, KatePart won’t implement any longer the SmartInterface nor the old CodeCompletionModelControllerInterface(2), but:
If your application relies on any of these two interfaces to be implemented (or will be crippled without them), you should switch over to the new interfaces and require KDE 4.5, as soon as it is released.
That way the applications will just keep working with KDE 4.5 and higher.
KDevelop already is on the way to do so, hope others might follow (the interfaces are not widely used it seems, that at least means not that much applications are hit, KDevelop and Kile are for sure the major ones).
I can understand that this change might not be really liked by any project using the interfaces, but the plain facts are:
- the code doesn’t work
- it is not maintained
- nobody still around really understands it
- the BC of the interfaces disallows to fix the design flaws without a new interface
There will be more information for about the new stuff in the future, but thought it is a good idea to remember people outside of the Kate development about the changes, before KDE 4.5 releases (which still will provide a KatePart implementing the old interfaces).