Is there a way to accelerate the execution speed and turn off the printing when I use a lot of mem commands in the debugger shell?

Yes. In order to turn of the printing add the -np to the mem command in your script file. It should look like the following:

  mem -np