[Haskell-cafe] Profiling, GUIs and libraries

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Mon May 21 12:52:36 EDT 2007


Just in case anyone was wondering how to do this with the other major
Haskell GUI lib Gtk2Hs...

./configure --enable-profiling

some day when Gtk2Hs is cabalised it'll be even easier.

Duncan

On Sun, 2007-05-20 at 17:39 +0200, Anthony Chaumas-Pellet wrote:
> Hello,
> 
> I'm currently hacking away a wxhaskell program that uses up 100% CPU
> even when it should be idle. So, rather than doing blind guesswork,
> I've thought about using profiling to spot the zealous function. I do
> not need a very accurate result, though.
> 
> ghc with -prof -auto(-all) produces the following error message,
> however: "Could not find module `Graphics.UI.WX': Perhaps you haven't
> installed the profiling libraries for package wx-0.10.1? Use -v to see
> a list of the files searched for."
> 
> So, I guess I need to rebuild wx with profiling, but I'm not sure how
> to do that exactly; <search engine> and the Wiki did not turn up any
> pointers, and there are no ready-made options to build wx with
> profiling. It seems Cabal can build a library with profiling
> automatically, but I don't think there exists a Cabalized version of
> wx yet.
> 
> That, and I'm not sure if recompiling libraries to add profiling is a
> great idea, as wx itself may depend on other external libraries. So,
> is there a better way than profiling in my case, or am I missing
> something obvious here?




More information about the Haskell-Cafe mailing list