[Haskell-cafe] Profiling, GUIs and libraries

Anthony Chaumas-Pellet alneyan at vectorstar.net
Sun May 20 11:39:39 EDT 2007


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?

Thanks!
Anthony


More information about the Haskell-Cafe mailing list