When Applesoft re-assigns a string value, it assigns the new value just below the last one. Soon all of free memory is full of old strings that aren't used, requiring Applesoft to free up room by sorting through all its strings and throwing out unused ones. This Garbage Collection may last up to five minutes, depending on how much memory is available and the number of string variables which must be cleared out. Applesoft gives no warning of garbage collection, nor is there a way to prevent it.
Applesoft also does garbage collection when it encounters the FRE(0) function, and this gives us a tool for at least warning the user that the computer will be busy for a while. Applesoft checks the value of PEEK (112) -PEEK (110); when the value is less than one, Applesoft does its garbage collecting. You can check that value to decide when to print a "DON'T WORRY" message, then use A = FRE(0) to force garbage collection. A statement line you could use in your program is:
1000 IF PEEK (112) - PEEK (110) < 2 THEN PRINT "STANDBY": A = FRE(0)
PRINT FRE(0) may cause the Apple to "hang" if it is invoked from direct mode (from the keyboard) immediately after loading a program from disk; similarly, it appears to hang upon using Applesoft RENUMBER since the variable pointers aren't all reset properly--use CLEAR before the PRINT FRE(0).