Skip to content

The Future of TikXML #137

@sockeqwe

Description

@sockeqwe

As you all have noticed TikXML is not in a good shape anymore. This has various reasons but the main reason probably is that I'm not working for Tickaroo anymore (since more than 2 years), the company where we have started this project. When I left Tickaroo, Tikxml was working good enough and kind of has been seen as feature completed as it worked good enough for the use case at Tickaroo.

Right now there are some real issues that need to be fixed:

That is why 0.8.13 is the last "working" and "stable" release as it has been published in the good old maven days but it lacks some improvements that have been added since then

When will be release 1.0 be published?

Obviously we have to fix the points above first but then:

  • Remove @ElementNameMatcher: @Bodo1981 (works at Tickaroo) did already some work on introducing a way to not have to annotate all subclasses in a hierarchy with @ElementNameMatcher but let the Annotation processor figure that out automatically. This adds a much better developer experience as Tickaroo has a lot of multiple data classes that inherit from one base class and every time you add new content you have to add or adjust ``@ElementNameMatcher` all over the place.

Therefore I would say this is the one missing feature that needs to be added to ship 1.0.

What comes after 1.0 or in other words what is not included in 1.0 release:

  • Incremental annotation processing: @Bodo1981 already looked into this because it could increase build times BUT it also depends how the removal of @ElementNameMatcher is implemented actually. Also, at Tickaroo most of the model data classes annotated with TikXML (as far as I know) live in one gradle module. Therefore gradle will recompile the whole gradle module anyway independently of incremental or not incremental annotation processor and causing other depending gradle modules to recompile as well. Therefore in the context of Tickaroo incremental annotation processing doesn't have highest priority because it is not the bottleneck BUT of course we acknowledge that others would benefit from incremental annotation porcessing. So I think it makes sense to add support for incremental annotation processing, just not before 1.0 release.
  • Better Kotlin support: TikXML started more than 5 years ago. Back then it has been designed for Java. Once Tickaroo started adopting Kotlin we basically added a quick workaround to TikXML that generates java wrappers under the hood to parse XML and set's the values on the real kotlin class. This is very memory inefficient as for a short period of time you will have 1 kotlin data object and 1 java object in memory representing actually the same piece of parsed xml. This causes gc to run more often as the java object can be garbage collected right after parsing (but TikXML is still much faster than other reflection based xml parsers out there, see benchmarks).
  • Revisit AutoValue support: Autovalue is supported basically be the same workaround as kotlin support (having 2 copies in memory and copying fields from a java pojo to autovalue builder). Again, very memory inefficient but I would also like to challenge if support for AutoValue makes sense in the age of kotlin.
  • Kotlin Multiplatform: No support for that planned right now (and it also looks that kotlinx serialization has no plans to add support for xml so there might be need for it) but if we would ever like to add support for Kotlin Multiplatform we would have to move away from Annotation Processing to Kotlin Compiler Plugin. This also should be taken into account while discussing incremental annotation processing.
  • Increase parsing speed: There is still a lot way of how to improve parsing with smarter data structures like Tries that could speed up parsing further.

I can take care of Continious Deployment point above and migrate things to CircleCI. The goal is to be able to release SNAPSHOTS and RELEASES from CircleCI whenever we push something to master branch (like accepting a PR) without having to do release management by 1 of the Tickaroo employees who know about the signing credentials.

For the other points, however, we need your help as we can't do that alone (I certainly cannot dedicate way more time for this project than I did in the past as I personally don't have too much need for TikXML and I don't work for Tickaroo anymore and have a lot of other open source projects going on in addition to ... you know ... life 😄 ). Any contribution is very much welcome and I wanted to thank all contributors so far especially @iNoles and @WeaponMan !

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions