No, the implementation in SPMF has no time or window size constraints. But some other algorithms in SPMF offers some constraints that are similar to this. And someone could add these constraints to the GSP implementation if they need.
For how the sequences are generated, I suggest to take the time to read the original article describing GSP carefully.If you read it carefully, it should answer your question. You can also look at the code or run it using the debuger to see how it works step by step. Or you may search some powerpoints perhaps that give some more detailed examples.
How to optimize GSP? I don't know. This is a research problem. But honestly, GSP is very very slow. It is an old algorithm. Rather than optimizing GSP, you should perhaps try to optimize a faster more recent algorithm. Look are some comparison that I have done about sequential pattern mining algorithm in my
PAKDD2014 paper: Look at Figure 5. GSP is easily the worst algorithm. On some of the six charts, I did not even put a line for GSP because it just run out of memory or was too slow. In my opinion, for research you should start from a faster algorithm.
Best,