Hi Lorena,
This is an interesting obcervation. Briefly, STAR maps a read as follows.
1). short pieces of a read ("seeds") are mapped to the genome. The length of the seeds is not fixed, instead STAR increases seed length until first mismatch. At that point, a new seed is started, and the procedure is repeated until all of the read sequence is covered by seeds.
2). Second, STAR defines genomic windows centered around "anchor seeds", which map fewer than --winAnchorMultimapNmax (50) times. The size of the window is determined by --alignIntronMax or --winBinNbits/--winAnchorDistNbins, by default it's ~600kb.
3). STAR collects all seed in each of the windows, and stitches (assembles) an alignment.
--seedPerWindowNmax (=50 by default) defines the maximum number of "seeds" that is allowed in each window. Usually this number is small, since it' basically equal to the total number of gaps, indels and mismatches in an alignment. However, in your case, the 99% of the reads did not originate from the short reference you are providing, which results in a large number of short seeds for each read. The mapping time scales exponentially with the number of seeds per window, so when you reduce --seedPerWindowNmax, the mapping speed increases.
Although this is a solution for the mapping speed problem, it seems a bit of hack, and it does not solve the underlying problem of incomplete reference.
In my view, the best solution is to create reference by adding your your inversion sequences (with flanking regions) as separate "chromosomes" to the whole genome sequence.
To avoid multi-mappers that map to both the inversion "chromosome", and the normal chromosomes, you can cut the inversion and flanking sequences from the normal chromosomes, or you can try to deal with these multi-mappers in post-processing.
Cheers
Alex