RASAperformance for increasingly large trackers

We are currently building a bot using rasa_core==0.14.4 . During testing we notice considerable slowdown, to the point that it is no longer usable, when having longer conversation. Typically, this happens after around 20 rounds, in our bot this corresponds to 80 events.

After profiling our bots we came to the conclusion that the constant (de)serializing and recreating of the tracker objects is the current bottleneck. Looking at the code, it seems that the processing becomes slower as more events are added to the tracker for two reasons. The line of code is the generate_all_prior_trackers method of the DialogueStateTracker .

First, if we understand correctly, more and more events need to be taken into account to recreate a tracker, but second, more and more trackers are recreated (one for every phase in the conversation). For testing, we are using the InMemoryTrackerStore so it is not related to the SQL or Redis store that can be used in production.

Are we missing something? Or is this a problem other users experience and does someone have a fix?

Yes, the tracker is currently not paginated or something like this. But having this behavior after 20 turns seems still weird to me. Which kind of machine are you running this on? How many trackers are in your tracker store?