The slowdown is caused by the squeezing of the system's caches. When applications require large amounts of memory, the system reduces the amount of memory allocated to "less important" uses such as the page cache. When the memory is freed, the page cache still doesn't have most of the pages the system needs, and they all have to fault in.
However, even in a worst-case situation, this should only take 30 seconds or so and realistically, it shouldn't take more than ten seconds. This is probably the time your mouse pointer is slow.
First, let me say that a "RAM optimizer" will make things worse. Your performance problems are caused by the cache size being small and RAM optimizers, by design, minimize the cache size.
The thing is, things should quickly return to normal once the page cache repopulates. So the question is, why is it still slow? The first thing to check is CPU usage -- does the CPU return to normal? The second thing to check is memory usage -- are there any processes using a much larger amount of memory than normal?
My bet is that it's a bug or leak. Those are the only things that would prevent the system from returning to normal afterwards.
1It's Windows. This is what Windows does. – Daniel R Hicks – 2012-03-30T18:19:52.097