I haven't seen this before myself (running on OS X), though in the past we had a report of slowdown in long-running ghci sessions which was hard to reproduce.  What versions of GHC and OS X are you using?

Do you know if this is a problem with text entry in general or only haskeline?  If you run the command

:m +System.IO Control.Exception Control.Monad
(hSetBuffering stdin NoBuffering >> hSetEcho stdin False >> forever (getChar >>= \c -> putStr ['{',c,'}'])) `finally` (hSetEcho stdin True >> hSetBuffering stdin LineBuffering)

and hold down the 'a' key, does it smoothly output "{a}{a}{a}..." or does it have similar hiccups?

-Judah



On Tue, Oct 21, 2014 at 5:02 PM, Evan Laforge <qdunkan@gmail.com> wrote:
On my OS X, if I load a couple hundred modules into ghci as bytecode,
text entry gets balky and laggy.  So e.g. if I hold down a key, the
letters will stream in but have frequent hiccups.  This seems to
adversely affect haskeline as well, such that, using vi mode,
sometimes ^[ to move to command mode will be lost, or it will
spontaneously go to insert mode, or ^[ followed by 'h' will be just
beep and remain in insert mode.  If I load most of the modules
compiled, this doesn't happen, or at least is not nearly so bad.

It doesn't seem to be due to background work by ghci or anything,
because it doesn't matter how long I wait after loading the modules.
My previous random guess was that increased memory use made the GC
work more, and my pauses were due to major collections.  But when I
try on linux, ghci remains responsive no matter how many modules I
load, so maybe it's an OS X only problem.

Do any other OS X users see this effect?
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users