Avoid having a Software Instrument track selected in the Arrange window. When a Software Instrument track is highlighted, Logic must devote enough CPU resources to insure that anything you might play live into the track can be processed. Be particularly aware of Track Stacks that include multiple Software Instrument sub-tracks. When you are mixing, try to keep an Audio or external MIDI track highlighted as you work. Only select a Software Instrument track or Track Stack at times when you are actually working with that particular track.