I have used direct line input methods with my mac, and you are never going to avoid delay if you are using the computer as your amp.
However, in order to record my guitar playing, I hook the guitar up first to my amp, and then use the line-out or headphone jack to hook up to the computer, giving the same sound as my amp with no delay at all.
So sorry, but you are never going to avoid delay.
An example of my guitar-amp-computer setup for recording. The guitar sounds much better than on some old songs I did where I recorded the amp with a microphone.
Disclaimer, the above song is from a long time ago and is mostly crap (especially the drums).