There are a number of reasons why a Twine based game may slow down the longer it is played but generally it is the result of lack of memory.
Two situations that cause the reduction of memory over time are:
1. Loading of media files (like images, audio, video),
These get stored either in the web-browser's or the application cache and the memory they use may not be released until after the game has ended. If you are planing of having a lot of media files, or very large ones, or both then you way want to think of ways of releasing the memory resource consume once it isn't needed.
2. The History system (and the Story variable state stored within it)
By default each time the story transitions from one passage to another (can be same passage) a copy of the current state (values) of all known story variables is made and that copy alone with the name of the Passage is added to the History system as a Moment. The default maximum number of Moments the History system can store depends on the story format you are using (Harlowe: unlimited(ish), SugarCube: 100), and the effect the storage of all those moments can have depends greatly on how many there are and how much data is being stored in those story variables. SugarCube allows you to configure the maximum number of moments that the History system stores.
Both of the above situations can especially effect turn based RPG like games because you generally visit a lot of passages repeatedly thus increasing the number of moments being stored.